infer icon indicating copy to clipboard operation
infer copied to clipboard

DEAD STORE reports many harmless cases like int i = 0xFFFFFFFF; i = SomeFunc();

Open lucmann opened this issue 5 years ago • 8 comments

infer version v0.15.0 in my case, 0xFFFF or 0xFFFFFFFF is a common initializer and there are a lot of this semantics in our code. I would like to ignore those harmless. but if I turn off liveness checker, I worry about missing some truely harmful bugs. Does Infer provide some filtering option or method?

lucmann avatar Apr 10 '19 09:04 lucmann

Hi, if this is Java you can use @SuppressLint("infer") annotation. https://fbinfer.com/support

If its not java there is currently no support for this.

martintrojer avatar Apr 17 '19 10:04 martintrojer

This function does what you want but only whitelists x = 0. I'd welcome a pull request to make the set of constants configurable by adding an option to infer/src/base/Config.ml.

jvillard avatar Apr 17 '19 10:04 jvillard

thanks! the whitelist can be added by an option. that's handful. I'll dig it.

lucmann avatar Apr 22 '19 03:04 lucmann

Any updates on this one? @lucmaa

XVilka avatar Mar 04 '20 05:03 XVilka

sorry that there is none of it yet. @XVilka

lucmann avatar Mar 04 '20 12:03 lucmann

I think it's so hard and I can't understand it completely.

2890148303 avatar Jun 11 '20 14:06 2890148303

I would be happy to do this, if no one else is working on it.

jobnz avatar Oct 21 '20 04:10 jobnz

Hey i opened this as this was tagged with good first issue?? but how do i contribute into this and also i dont know what to contribute??!

vickvey avatar Dec 26 '23 12:12 vickvey