It's still UB. The array could potentially be at the end of the address space...
See https://news.ycombinator.com/item?id=13719437
Some features had a bug which lead to uninitialized memory (AKA previous memory contents) in the output of a malformed HTML page was requested. As one such server handles many sites, everything that the server handled…
It's C. If you have an array, you may only compare to one element behind the last. Everything else is undefined behavior. So a compiler may just "optimize" your >= to ==.
It's still UB. The array could potentially be at the end of the address space...
See https://news.ycombinator.com/item?id=13719437
Some features had a bug which lead to uninitialized memory (AKA previous memory contents) in the output of a malformed HTML page was requested. As one such server handles many sites, everything that the server handled…
It's C. If you have an array, you may only compare to one element behind the last. Everything else is undefined behavior. So a compiler may just "optimize" your >= to ==.