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

Binaries optimized out #7

Open
chaws opened this issue May 4, 2016 · 0 comments
Open

Binaries optimized out #7

chaws opened this issue May 4, 2016 · 0 comments

Comments

@chaws
Copy link

chaws commented May 4, 2016

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.

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

1 participant