News for hackers. Stuff that matters.
Re:Everything in C is undefined behavior by steveklabnik on Wednesday May 20, 2026 @09:42PM (#48216789)
> What if the wrapped index is used to construct an invalid pointer?

Using that pointer would be UB, but that is UB, not the addition.

> What if the integer is used to read the wrong data from disk, or corrupt data on disk by writing to the wrong location?

That is a bug, but it is not undefined behavior.

There are no comments on this comment yet.