Re: *** buffer overflow detected ***: /usr/src/linux/tools/perf/perf terminated
From: Markus Trippelsdorf
Date: Mon Dec 19 2016 - 12:28:52 EST
On 2016.12.19 at 17:52 +0100, Markus Trippelsdorf wrote:
> On 2016.12.19 at 17:18 +0100, Markus Trippelsdorf wrote:
> > Running the latest kernel git tree, I get buffer overflow warnings when
> > I try to run "perf top":
> >
> > *** buffer overflow detected ***: /usr/src/linux/tools/perf/perf terminated
>
> It only happens when I link my kernel with gold.
>
> (with ld.bfd)
> markus@x4 linux % readelf -n vmlinux
>
> Displaying notes found in: .notes
> Owner Data size Description
> GNU 0x00000014 NT_GNU_BUILD_ID (unique build ID bitstring)
> Build ID: 74b478c2194c0ba07481acf30f6f8781d4ffcdee
>
> (with ld.gold)
> markus@x4 linux % readelf -n vmlinux
>
> Displaying notes found in: .note.gnu.build-id
> Owner Data size Description
> GNU 0x00000014 NT_GNU_BUILD_ID (unique build ID bitstring)
> Build ID: 017ef6e6f8ce3b44332d0baa0767526bb3a77bf8
>
> Displaying notes found in: .note.gnu.gold-version
> Owner Data size Description
> GNU 0x00000009 NT_GNU_GOLD_VERSION (gold version)
> Version: gold 1.12
>
> And perf than chokes when parsing /sys/kernel/notes.
Started with gold commit:
commit bfbf34de2f27672282d4fa4c0916cc41890dcc6c
Author: Cary Coutant <ccoutant@xxxxxxxxx>
Date: Mon Dec 12 18:51:29 2016 -0800
When using linker scripts, place linker-generated sections by the output section name.
I've opened a gold bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=20983
--
Markus