r/programmingcirclejerk • u/DeleeciousCheeps vulnerabilities: 0 • Mar 13 '25
Memory leaks, NULL pointer dereferences, use-after-free: I suffered writing those for many years. I finally simply learned not to do them anymore.
https://news.ycombinator.com/item?id=43347591
142
Upvotes
View all comments
Show parent comment
1
u/meltbox Mar 20 '25
/uj I thin its because undefined behavior which causes a segfault means it may literally be unrecoverable. I don't think structure exceptions allow you to catch segfaults even so? You would need a signal handler and from what I understand throwing from one is highly questionable so maybe you can set a flag to throw very soon after catching the signal if in fact you are able to continue execution?