Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Sep 2023 19:39:25 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 273956] KERN_PROC_VMMAP does not read all mapped files
Message-ID:  <bug-273956-227-eCQiUhQoef@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-273956-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-273956-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273956

--- Comment #8 from Paul Floyd <pjfloyd@wanadoo.fr> ---
(In reply to Ed Maste from comment #6)

I know a thing or two about this.

Initially Valgrind would only trigger reading debuginfo when it considered a
file to have finished mapping. That used to mean seeing 1 RX and 1 RW secti=
on.
Then lld 9 started writing 2 RW sections. Gory details here:
https://bugs.kde.org/show_bug.cgi?id=3D452802

So now Valgrind takes a peak at the binary to count the RW PT_LOADs and then
triggers the debuginfo when it has seen 1 RW and the right number of RW
PT_LOADs.

Pretty much all binaries on FreeBSD now have 1 RC and 2 RW. For instance=20

readelf -l /bin/sleep

RO    02     .interp .note.tag .dynsym .gnu.version .gnu.version_r .gnu.hash
.hash .dynstr .rela.dyn .rela.plt .rodata .eh_frame_hdr .eh_frame=20
RX    03     .text .init .fini .plt=20
RW1   04     .ctors .dtors .jcr .init_array .dynamic .got=20
RW2   05     .data .got.plt .bss=20

(I added the 1st column)

The valgrind tools are totally static so they son't have any segments like =
got
plt=20


readelf -l .in_place/memcheck-amd64-freebsd

RO   01     .note.tag .rodata .eh_frame_hdr .eh_frame=20
RX   02     .text=20
RW1   03     .data .bss

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-273956-227-eCQiUhQoef>