Git Product home page Git Product logo

itc-benchmarks's People

Contributors

regehr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

itc-benchmarks's Issues

Problem in data_underflow.c

For the last example,

void data_underflow_012 ()
{
int min = -2147483647;
int dlist[4] = {0, 1, -2, -1};
int ret;
ret = min - dlist[2]; /Tool should detect this line as error/ /ERROR:Data underflow/
}

min - (-2) = min + 2; it will not be an error

01.w_Defects/free_null_pointer.c

If I'm reading things correctly, https://github.com/regehr/itc-benchmarks/blob/master/01.w_Defects/free_null_pointer.c is a test that a verifier complains about a free of a NULL pointer.

However, it's legal to call free on a NULL pointer;
to quote "7.20.3.2 The free function" of http://www.open-std.org/JTC1/SC22/wg14/www/docs/n1124.pdf

If ptr is a null pointer, no action occurs

If so, are these tests requiring false positives? (or am I misunderstanding things?)

Hope this is constructive

Binaries optimized out

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.