2 ms·
From my understanding, I think that option only prevents the compiler from removing null checks when the pointer was dereferenced before. It was probably motiva
by lesenek 3y ago
From my understanding, I think that option only prevents the compiler from removing null checks when the pointer was dereferenced before. It was probably motivated by this incident in the Kernel[1] where an optimized-out null check condition (because it was dereferenced right before) caused a vulnerability. I like this story, since both sides (Linux vs GCC) have perfectly reasonable positions IMO.
[1] https://lwn.net/Articles/342330/ https://lwn.net/Articles/342330/
PS: I took action by contacting Dang about the shadowban; thank you for warning me, I was wondering why I felt like a ghost.