In the WriteTraceFileHeader() function in trace_file_writer.cc the header
pointer gets initialized to point to the top of the buffer being used by the
VectorBufferWriter for serializing the variable length portion of the header.
After writing the variable length part of the header, the code tries to update
the header with the total length, and tries to align the writer to the page
size.
The problem is that writing the variable length part of the header may have
caused the underlying buffer memory (managed by a vector) to have been
reallocated. The header pointer may now be pointing to the wrong memory region.
The header pointer should be reset before adjusting the header size and
aligning the stream to a page boundary.
Original issue reported on code.google.com by rog...@chromium.org on 15 May 2012 at 7:27
Original issue reported on code.google.com by
rog...@chromium.org
on 15 May 2012 at 7:27