MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerAnimemes/comments/cox6bb/null_pointer/ewmax7b/?context=3
r/ProgrammerAnimemes • u/TVNik • Aug 11 '19
28 comments sorted by
View all comments
Show parent comment
4
In C, dereferencing a null pointer is undefined behaviour.
0 u/FinFihlman Aug 11 '19 True. But is that all? 3 u/ThePyroEagle λ Aug 11 '19 Indexing outside the bounds of an array.Dividing a fixed point by 0.Overflowing a signed fixed point.Using an automatic variable before it's initialized. 2 u/FinFihlman Aug 11 '19 Ah yeah, I forgot UB doesn't mean "crash and burn" all the time since sane handling exists for all of these.
0
True. But is that all?
3 u/ThePyroEagle λ Aug 11 '19 Indexing outside the bounds of an array.Dividing a fixed point by 0.Overflowing a signed fixed point.Using an automatic variable before it's initialized. 2 u/FinFihlman Aug 11 '19 Ah yeah, I forgot UB doesn't mean "crash and burn" all the time since sane handling exists for all of these.
3
2 u/FinFihlman Aug 11 '19 Ah yeah, I forgot UB doesn't mean "crash and burn" all the time since sane handling exists for all of these.
2
Ah yeah, I forgot UB doesn't mean "crash and burn" all the time since sane handling exists for all of these.
View all comments
Show parent comment
4
u/ThePyroEagle λ Aug 11 '19
In C, dereferencing a null pointer is undefined behaviour.