From: Sebastien Bourdeauducq <sb@m-labs.hk>
To: musl@lists.openwall.com
Subject: Re: [musl] building statically linked DSOs with musl
Date: Sat, 1 Jan 2022 22:31:58 +0800 [thread overview]
Message-ID: <54060b8f-2ff1-fa1c-abc7-ac4996858ffb@m-labs.hk> (raw)
In-Reply-To: <1641045086.i0hohehzro.none@localhost>
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
next prev parent reply other threads:[~2022-01-01 14:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-01 9:32 Sebastien Bourdeauducq
2022-01-01 12:56 ` Joakim Sindholt
2022-01-01 13:58 ` Alex Xu (Hello71)
2022-01-01 14:31 ` Sebastien Bourdeauducq [this message]
2022-01-02 21:41 ` Markus Wichmann
2022-01-03 1:37 ` Sebastien Bourdeauducq
2022-01-03 7:05 ` Markus Wichmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54060b8f-2ff1-fa1c-abc7-ac4996858ffb@m-labs.hk \
--to=sb@m-labs.hk \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).