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

Unsigned integer overflow detected by AddressSanitizer #5

Open
delfrrr opened this issue Sep 9, 2018 · 1 comment
Open

Unsigned integer overflow detected by AddressSanitizer #5

delfrrr opened this issue Sep 9, 2018 · 1 comment

Comments

@delfrrr
Copy link
Owner

delfrrr commented Sep 9, 2018

when compiling with -fsanitize=address,undefined,integer

$ make test
/home/travis/build/delfrrr/delaunator-cpp/include/delaunator.hpp:412:34: runtime error: unsigned integer overflow: 18446744073709551615 + 2 cannot be represented in type 'unsigned long'
@flippmoke
Copy link
Contributor

I assume this is from the fact that I selected the std::numeric_limits<std::size_t>::max() to be our magic value for indexes that are not yet assigned. Therefore, at some point we are calling legalize() and it is selecting a half_edge that has this index value preset. There likely needs to be a check to prevent this from occurring here.

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

2 participants