|
|
|
|
|
by benschulz
498 days ago
|
|
Because the compiler optimizes based on the assumption that consecutive reads yield the same value. Reading from uninitialized memory may violate that assumption and lead to undefined behavior. (This isn't the theoretical ivory tower kind of UB. Operating systems regularly remap a page that hasn't yet been written to.) |
|