Merge branch 'linus' into perf/core, to fix conflicts
Conflicts: tools/perf/arch/arm/annotate/instructions.c tools/perf/arch/arm64/annotate/instructions.c tools/perf/arch/powerpc/annotate/instructions.c tools/perf/arch/s390/annotate/instructions.c tools/perf/arch/x86/tests/intel-cqm.c tools/perf/ui/tui/progress.c tools/perf/util/zlib.c Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
@@ -605,9 +605,19 @@ static struct arch *arch__find(const char *name)
|
||||
int symbol__alloc_hist(struct symbol *sym)
|
||||
{
|
||||
struct annotation *notes = symbol__annotation(sym);
|
||||
const size_t size = symbol__size(sym);
|
||||
size_t size = symbol__size(sym);
|
||||
size_t sizeof_sym_hist;
|
||||
|
||||
/*
|
||||
* Add buffer of one element for zero length symbol.
|
||||
* When sample is taken from first instruction of
|
||||
* zero length symbol, perf still resolves it and
|
||||
* shows symbol name in perf report and allows to
|
||||
* annotate it.
|
||||
*/
|
||||
if (size == 0)
|
||||
size = 1;
|
||||
|
||||
/* Check for overflow when calculating sizeof_sym_hist */
|
||||
if (size > (SIZE_MAX - sizeof(struct sym_hist)) / sizeof(struct sym_hist_entry))
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user