Created
November 8, 2017 14:05
-
-
Save bobergj/db615e08f00c7820532f151b880775b3 to your computer and use it in GitHub Desktop.
Undefined behaviour in CGAL::internal::vector
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Compile and run as follows: | |
// $ clang++ main.cpp -I<cgal-and-boost-include-path> -L<cgal-library-path> -lCGAL -fsanitize=undefined | |
// $ ./a.out | |
// CGAL/vector.h:75:57: runtime error: reference binding to null pointer of type 'int' | |
// | |
#include <CGAL/vector.h> | |
int main() { | |
CGAL::internal::vector<int> foo; | |
std::cout << foo.size() << std::endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment