Comment

Comment by thomashabets2

Author here.

No. That's just one of the MANY ways to trigger UB. In the article I also trigger UB by dereferencing a null pointer instead.

In fact, here's an example where calling `unreachable()` and dereferencing a null pointer produce the EXACT same assembly: https://godbolt.org/z/538qfj9z9

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton