-
Notifications
You must be signed in to change notification settings - Fork 65
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
Binaries optimized out #7
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, first place, good work for making these test cases available! Thanks!
Autoconf is generating Makefiles with CFLAGS='-g -O2', and -O2 will optimized lots of parts of the code since most of it just exist to support the vulnerability.
For example: https://github.com/regehr/itc-benchmarks/blob/master/01.w_Defects/free_null_pointer.c#L452, should receive a SIGSEGV, since ptr is NULL and is being accessed. But it actually doesn't crash since -O2 is on, so GCC optimized out that line.
I'd recommend adding the following line to your README.md:
./configure CFLAGS='-g' CXXFLAGS='-g', will prevent from passing -O to GCC
in case someone wants to make binary analysis.
The text was updated successfully, but these errors were encountered: