Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Feb 2025 06:16:59 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 284563] Holes in struct rtld_utrace
Message-ID:  <bug-284563-227-7PvNJbY9rR@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-284563-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-284563-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=3D284563

--- Comment #2 from Paul Floyd <pjfloyd@wanadoo.fr> ---
(In reply to Konstantin Belousov from comment #1)

You're right, I was too quick looking at the struct. Here is the pahole out=
put

struct utrace_rtld {
        char                       sig[4];               /*     0     4 */
        int                        event;                /*     4     4 */
        void *                     handle;               /*     8     8 */
        void *                     mapbase;              /*    16     8 */
        size_t                     mapsize;              /*    24     8 */
        int                        refcnt;               /*    32     4 */
        char                       name[1024];           /*    36  1024 */

        /* size: 1064, cachelines: 17, members: 7 */
        /* padding: 4 */
        /* last cacheline: 40 bytes */
};

so there is just the 4 bytes of padding at the end that is uninitialized and
was triggering errors. The i386 ld.so is OK since everything is a multiple =
of
4.

I've already fixed this in Valgrind. I don't know whether MSAN has a similar
issue.

Zeroing the entire 1064 bytes would also fix the problem for sure.

--=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-284563-227-7PvNJbY9rR>