Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 1 Jan 2022 22:31:58 +0800
From: Sebastien Bourdeauducq <sb@...abs.hk>
To: musl@...ts.openwall.com
Subject: Re: building statically linked DSOs with musl

On 1/1/22 21:58, Alex Xu (Hello71) wrote:
> First,
> malloc implementations (may) use a process-global resource: (s)brk. It
> will cause havoc if multiple implementations attempt to simultaneously
> manipulate it. Second, even if no more than one implementation uses
> (s)brk, they will still have incompatible metadata.

Can't there be two different heaps in different memory regions?

> Consider the case
> where your plugin allocates some memory with malloc, then passes the
> pointer to Python which then frees it. Since an incompatible
> implementation is processing it, it will most likely destroy the heap or
> crash.

Well yes, that's a fairly obvious issue and we are not doing that; the 
side that allocates the memory is always the one that frees it.

Sébastien

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.