analyzer icon indicating copy to clipboard operation
analyzer copied to clipboard

Refactor writing to pointers

Open karoliineh opened this issue 1 year ago • 2 comments

TODO

  • [ ] Test #1562.

karoliineh avatar Jul 01 '24 14:07 karoliineh

Decisions from GobCon on 09.07:

What should happen when we write to a pointer that is either known or NullPtr?

  • a) Should we keep the NullPtr and join the known values
  • b) Or should we assume that if it is null, the program crashes anyways, and if it continues, the known value can only be the one that was written
  • [ ] Add b) as default behavior, make it configurable (for now), with option called sem.abort-on-null-deref

karoliineh avatar Jul 16 '24 09:07 karoliineh

We already have the option sem.null-pointer.dereference (for reading) and I think we decided to reuse that for writing. Its name and values might need to be changed though to match both reading and writing.

sim642 avatar Jul 16 '24 09:07 sim642

This seems to have gotten stuck. Are there plans here?

michael-schwarz avatar Feb 28 '25 17:02 michael-schwarz

There was the matter of naming/describing the option but we discussed it and something seems to have been implemented. Not sure about the test failures though.

I think it makes sense to do this though.

sim642 avatar Mar 03 '25 09:03 sim642