Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160218180513.GA3969@port70.net>
Date: Thu, 18 Feb 2016 19:05:13 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: Timo Teras <timo.teras@....fi>, musl@...ts.openwall.com
Subject: Re: dynlink.c: bug in reclaim_gaps leading to segfault in
 __libc_exit_fini

* Szabolcs Nagy <nsz@...t70.net> [2016-02-17 11:19:17 +0100]:
> * Timo Teras <timo.teras@....fi> [2016-02-17 09:03:27 +0200]:
> > Well - musl really should introduce __donatemem or similar for this
> > purpose, and not overload the standard free() function. This would make
> > the valgrind warning go away.
> 
> to please valgrind the options are
> 
> 1) have an internal free which valgrind does not know
>    about, but public free calls it, so all public calls
>    of free would go through an extra indirection.
> 
> 2) have a copy of the internal logic of free under a
>    different name, which means maintenance work and
>    code size increase.
> 
> 3) or have a suppression file.
> 
> i think 3) is a reasonable solution.

i looked at this again: i think moving most of reclaim()
function into src/malloc makes sense, so all malloc
internal knowledge is at one place (even if dynlink.c
is the only user of this code).

but i don't see an easy way to do the reclaim without
calling free (so the valgrind problem is not solved,
only code maintenance gets better)

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.