NagyDonat wrote:

> I was thinking about using `check::Location` in this checker. The real 
> problem is when the fixed address is used (to store or load), not if it is 
> assigned to a pointer. (Or a fixed address becomes escaped.)

I agree that a checker that activates when a fixed address is _dereferenced_ 
would be more useful overall. In fact before you started to work on this 
checker, I misread its code and thought that it already operates that way (like 
`core.NullDereference`)

By the way, be careful with `check::Location` because I vaguely recall that 
there are a few corner cases where it does not cover some sort of location 
access: 
https://discourse.llvm.org/t/checklocation-vs-checkbind-when-isload-false/72728/6
 . (Ask @steakhal if you need more details. At that point examination of this 
problem was interrupted because I converted `ArrayBoundV2` to using `PreStmt` 
callbacks (for unrelated reasons) -- but if you want to introduce 
`check::Location` here then it might be useful to revisit the issue.)

The current behavior of this checker is not entirely useless (I can imagine 
that perhaps somebody wants to enable it to enforce a design rule), but I don't 
think that it's relevant enough to preserve.

https://github.com/llvm/llvm-project/pull/110977
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to