secure-software-engineering / phasar

A LLVM-based static analysis framework.
Other
943 stars 142 forks source link

Added a uninit variables analysis with indexes #732

Open StamesJames opened 2 months ago

StamesJames commented 2 months ago

The added analysis exists as a seperate tool and does the same as the ifds-uninit analysis in phaser-cli but also remembers which indices are initialized.

This is related to Issue #720

I started it because I tried using phaser for rust code and in rusts llvm code the compiler often initializes structs field by field because of which phaser detects a lot of uninitialized variables that are not really uninitialized.

fabianbs96 commented 1 month ago

Hi @StamesJames, thank you for your contribution! I am in favor of merging this into phasar. For this to succeed, can you please modify your code to make the CI pipeline pass? The only thing it complained about was code formatting, so you can fix it by just running clang-format-14 on the files that you have changed.

StamesJames commented 1 month ago

Hi @fabianbs96 yes sure I will fix this. And currently I haven't put the copyrights comment at the beginning of my newly created files and for the indexed analysis I just copied the original uninitialized analysis file so there is still the copyrights comment from the original. Should I change this somehow?

fabianbs96 commented 1 month ago

Hi @StamesJames, yes, I think it is fine to keep the copyright notice. For the copied file, you can add yourself as contributor, if you like. This should be fine from my point of view (I am not a lawyer, though^^)