Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential undefined behavior when negating value in sdsll2str #90

Open
ghost opened this issue Jan 28, 2018 · 0 comments
Open

Potential undefined behavior when negating value in sdsll2str #90

ghost opened this issue Jan 28, 2018 · 0 comments

Comments

@ghost
Copy link

ghost commented Jan 28, 2018

When compiling with UndefinedBehaviorSanitizer and running the tests (CC=clang-6.0 CFLAGS='-fsanitize=undefined', the following error is raised:

[...]
6 - sdscatprintf() seems working in the base case: PASSED
sds.c:446:23: runtime error: negation of -9223372036854775808 cannot be represented 
in type 'long long'; cast to an unsigned type to negate this value to itself
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior sds.c:446:23 in
[...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants