The begin_char and end_char fields in Memtrace's trace format are 8 and 10 bits in size, respectively, but they were only being clamped to 12 bits (0xfff). This is particularly bad for the end_char field, as it causes the too-large value to get OR-ed with the filename_code field, which is an index into an MTF cache, so a single error will desync the reader state from the writer, causing a fatal error at some point in the future (fun!).
The
begin_char
andend_char
fields in Memtrace's trace format are 8 and 10 bits in size, respectively, but they were only being clamped to 12 bits (0xfff
). This is particularly bad for theend_char
field, as it causes the too-large value to get OR-ed with thefilename_code
field, which is an index into an MTF cache, so a single error will desync the reader state from the writer, causing a fatal error at some point in the future (fun!).