Get the latest tech news
A Compiler Bug (2023)
compiler bug Written 2023-09-29 Tags:c compiler Around 10 years ago, I found a bug in a vendor's compiler. The Driver Quite often we needed to read an asynchronous hardware timer.
Effectively like hooking a 32-bit parallel timer to a 32-bit input port, just entirely inside the chip. I no longer have access to the original, so I've run this through GCC 13.2.0, -O2, which roughly matches: In the common case where the bus race condition does not occur, the timer is read twice, it matches and returns.
Or read this on Hacker News