zlib-rs in Firefox
15 points by freddyb
15 points by freddyb
our implementation triggered the infamous Intel Raptor Lake CPU bug … mov byte ptr [rsi + rdi + 1], ch … Due to the hardware bug, occasionally this instruction will actually write bits 0-7 instead
TIL - holy sh*t.
The logs showed that a bounds check had failed that logically couldn't fail. Of course, we're lucky that we even got a bounds check failure; in C you'd just get silent data corruption.
I'm glad the compiler wasn't smart enough to optimize away a check that "cannot fail"!
(This landed in Firefox 151, which was released 4 weeks ago. Not to be confused with 152 which is released today)