while investigating some FW crashes due to segmentation fault, caused by malloc trying to allocate a block and complaining that the block CRC isn't the same as when it was freed,
I ran valgrind (on our reproducible setup offline) and got a hint that something bad is going on in some lines in parser.rs
the only thing I could imagine happening is the "buf" pointer somehow becoming invalid,
it seems this can happen if the output_buffer vec grows and is reallocated.
got rid of it - and the valgrind complaints went away, as well as the crashes.
still not sure exactly about the scenario though - because the vector is preallocated generously on startup,
so we might want to continue looking into the input as there may be something fishy going on there.
WDYT?
while investigating some FW crashes due to segmentation fault, caused by malloc trying to allocate a block and complaining that the block CRC isn't the same as when it was freed, I ran valgrind (on our reproducible setup offline) and got a hint that something bad is going on in some lines in parser.rs the only thing I could imagine happening is the "buf" pointer somehow becoming invalid, it seems this can happen if the output_buffer vec grows and is reallocated. got rid of it - and the valgrind complaints went away, as well as the crashes. still not sure exactly about the scenario though - because the vector is preallocated generously on startup, so we might want to continue looking into the input as there may be something fishy going on there. WDYT?