Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 16 Feb 2016 17:02:09 -0500
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: dynlink.c: bug in reclaim_gaps leading to segfault in
 __libc_exit_fini

On Tue, Feb 16, 2016 at 10:55:50PM +0100, Szabolcs Nagy wrote:
> * Hugues Bruant <hugues@...ofs.com> [2016-02-16 16:30:42 -0500]:
> > Affects both 1.1.12 and 1.1.13
> > 
> > Tracked down with valgrind in Alpine Linux 3.3.
> > 
> > The dmg tool build from https://github.com/aerofs/libdmg-hfsplus links to a
> > handful shared libs. The following message is seen immediately at start:
> > 
> > ==59== Invalid free() / delete / delete[] / realloc()
> > ==59==    at 0x4C92B0E: free (vg_replace_malloc.c:530)
> > ==59==    by 0x4056F68: reclaim_gaps (dynlink.c:488)
> > ==59==    by 0x405743D: map_library (dynlink.c:708)
> > ==59==    by 0x4057EF3: load_library (dynlink.c:1014)
> > ==59==    by 0x4058CA8: load_preload (dynlink.c:1112)
> > ==59==    by 0x4058CA8: __dls3 (dynlink.c:1581)
> > ==59==    by 0x405856A: __dls2 (dynlink.c:1383)
> > ==59==    by 0x405655E: ??? (in /lib/ld-musl-x86_64.so.1)
> > ==59==    by 0x3: ???
> > ==59==    by 0xFFF000E3A: ???
> > ==59==    by 0xFFF000E3E: ???
> > ==59==    by 0xFFF000E44: ???
> > ==59==    by 0xFFF000E86: ???
> > 
> > Afterwards, the program proceeds with no issue, until it exists, at which
> > point a segfault is triggered when cleaning up shared libraries:
> > 
> 
> this is not a bug.

Well the crash is a bug, but it's not clear what the source of the bug
is.

> valgrind is not aware of dynamic linker internals,
> you have to use a musl specific suppression file
> to hide this message (but i dont know if anybody
> wrote such thing for valgrind).

Indeed, I'm not sure either.

I've commented with some further ideas on the bug tracker.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.