3 ms·
The example I gave in there is of adding sentinel values in your data, so you can check the constants in your data structures later and go "oh, this is overwrit
by rincebrain 7mo ago
The example I gave in there is of adding sentinel values in your data, so you can check the constants in your data structures later and go "oh, this is overwritten with garbage" versus "oh, this is one or two bits off". I would imagine plumbing things like that through most common structures is what was done there, though I haven't done the archaeology to find out, because Firefox is an enormous codebase to try and find one person's commits from several years ago in.
- patrulek 7mo agoBut it would be also possible that sentinel value used for comparison changed because of bitflip, not data structure used by program.
- rincebrain 7mo agoDetecting that is the point, yes.
- kevincox 7mo agoThis doesn't always protect against out-of-bounds writes. Although if these sentinel values are in read only memory mappings it probably gets pretty close. (Especially if you consider kernel memory corruption a "bitflip".)
- rincebrain 7mo agoWell, yes, the author described it as "a heuristic", which checking sentinel values would seem to match.