On Fri, 26 Jul 2019, Arnaldo Carvalho de Melo wrote: > Em Fri, Jul 26, 2019 at 04:46:51PM -0400, Vince Weaver escreveu: > > > > Currently the perf_data_fuzzer causes perf report to get stuck in an > > infinite loop. > > > > >From what I can tell, the issue happens in reader__process_events() > > when an event is mapped using mmap(), but when it goes to process the > > event finds out the internal event header has the size (invalidly) set to > > something much larger than the mmap buffer size. This means > > fetch_mmaped_event() fails, which gotos remap: which tries again with > > the exact same mmap size, and this will loop forever. > > > > I haven't been able to puzzle out how to fix this, but maybe you have a > > better feel for what's going on here. > > Perhaps the patch below?
yes, with the patch you provided I can no longer trigger the infinite loop. Tested-by: Vince Weaver <[email protected]>

