3 ms·
I found a compiler bug while doing a university project for applying image filters using C, asm and gcc. I had created a packed structure for an RGB pixel, so 3
by Izikiel43 4y ago
I found a compiler bug while doing a university project for applying image filters using C, asm and gcc.
I had created a packed structure for an RGB pixel, so 3 bytes.
The C code was super simple, read a byte, apply function, move on, but an image diff showed errors.
The problem was that gcc was reading 4 bytes at a time, and this caused an out of bounds read that shouldn't happen.
- strager 4y agoInteresting. I've heard of GCC doing this and breaking multi-threaded code, but not breaking single-threaded code. I'm curious. Can you share the bug report?