Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf tools: fix off-by-one error in maps
This patch fixes off-by-one errors in the management of maps. A map is defined by start address and length as implemented by map__new(): map__init(map, type, start, start + len, pgoff, dso); map->start = addr; map->end = end; Consequently, the actual address range is [start; end[ map->end is the first byte outside the range. This patch fixes two bugs where upper bound checking was off-by-one. In V2, we fix map_groups__fixup_overlappings() some more where map->start was off-by-one as reported by Jiri. Signed-off-by: Stephane Eranian <[email protected]> Acked-by: Namhyung Kim <[email protected]> Cc: David Ahern <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/20141006083532.GA4850@quad Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
- Loading branch information