logoalt Hacker News

jstimpfleyesterday at 10:13 PM1 replyview on HN

Then I'm almost ashamed to admit that I'm not sure I've ever witnessed any surprising form of UB in the wild. For example, I will reliably get segfaults on NULL dereference in practice. Typical manifestations of UB are entirely predictable and obvious. Of course I'm also running most code without most optimizations, most of the time, while developing.

On the other hand, what I've observed with my own eyes is interesting phenomenons like performance drops, e.g. memory bandwidth dropping from gigabytes/sec to 300 KB/sec due to false sharing on an ARM SOC for example.


Replies

saagarjhatoday at 7:34 AM

Compilers do not surprise all that often which is why it is extra surprising when it does happen