Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 18 Feb 2016 19:05:13 +0100
From: Szabolcs Nagy <>
To: Timo Teras <>,
Subject: Re: dynlink.c: bug in reclaim_gaps leading to segfault in

* Szabolcs Nagy <> [2016-02-17 11:19:17 +0100]:
> * Timo Teras <> [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.