Git Product home page Git Product logo

Comments (2)

Enkelmann avatar Enkelmann commented on June 4, 2024

About fixpoint computations in general: We compute properties of programs at specific execution points. We want these properties to hold true regardless of the execution path that was taken to reach that program point. The point of fixpoint computations is that one computes these properties in a path-dependent manner, but then continues computation until a fixpoint is reached. If one can reach a fixpoint, then the result will hold true regardless of the execution path taken to the program point, despite being computed with path-dependent methods.

For the function signatures this is very important, because other analyses depend on the correctness of this computation. For the CWE-119 check on the other hand, it is a choice to use fixpoint computations. There are other approaches one can use here with different advantages and drawbacks. A somewhat abstract motivation is that in the far future we may be able to prove the absence of certain bug classes if we do not find any CWEs with a fixpoint-based analysis approach. But in the cwe_checker we are still far away from that.

If you want to read up on the topic I recommend looking at the literature regarding compiler optimizations like dead code removal, expression propagation, and the like, as they are usually also implemented using fixpoint computations. Unfortunately, I do not maintain a list of good beginner literature for the topic at the moment.

Why the param_access_stubs and the stubbed_variadic_symbols are generated at runtime: In theory, you can make the two computation functions const, which would mean that they are computed at compile time. The const fn story of Rust is still evolving and I have not checked whether newer versions of Rust allow this already. However, the runtime cost is negligible anyway.

from cwe_checker.

Brubbish avatar Brubbish commented on June 4, 2024

Thank you for the detailed explanation!! It is quite clear now.

from cwe_checker.

Related Issues (20)

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.