RE: [PATCH 16/53 v2] perf tools: Fix mmap2 event allocation in synthesize code
From: åæéå / HIRAMATUïMASAMI
Date: Tue Jan 12 2016 - 19:40:22 EST
From: acme@xxxxxxxxxx [mailto:acme@xxxxxxxxxx]
>Em Tue, Jan 12, 2016 at 06:51:07PM +0800, Wangnan (F) escreveu:
>> On 2016/1/12 18:49, åæéå / HIRAMATUïMASAMI wrote:
>> >>From: Wang Nan [mailto:wangnan0@xxxxxxxxxx]
>> >>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.
>> >Looks good to me. But hope to have another rename patch soon after this...
>> According to Arnaldo, we don't need rename patch. He think mmap_event
>> is okay. Right?
>Right, no need for the rename.
OK, confirmed :)