From: Wang Nan [mailto:wangnan0@xxxxxxxxxx]Looks good to me. But hope to have another rename patch soon after this...
perf_event__synthesize_mmap_events() issues mmap2 events, but the
memory of that event is allocated using:
mmap_event = malloc(sizeof(mmap_event->mmap) + machine->id_hdr_size);
If path of mmap source file is long (near PATH_MAX), random crash
would happen. Should use sizeof(mmap_event->mmap2).
Fix two memory allocations.