mailing list of musl libc
 help / color / mirror / code / Atom feed
From: =?gb18030?B?zcPX09bt?= <>
To: =?gb18030?B?bXVzbA==?= <>
Subject: [musl] =?gb18030?B?u9i4tKO6IFttdXNsXVtQQVRDSF1maXggdHNkJ3MgaXNzdWU=?=
Date: Wed, 15 Feb 2023 09:45:49 +0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030", Size: 1976 bytes --]

I got it, I am using version 1.2.0, Next I will switch to the latest version.

·¢¼þÈË:                                                                                                                        "musl"                                                                                    <;;
·¢ËÍʱ¼ä:&nbsp;2023Äê2ÔÂ14ÈÕ(ÐÇÆÚ¶þ) ÍíÉÏ9:44
Ö÷Ìâ:&nbsp;Re: [musl][PATCH]fix tsd's issue

On Tue, Feb 14, 2023 at 07:05:15AM -0500, Rich Felker wrote:
&gt; On Tue, Feb 14, 2023 at 03:25:23PM +0800, ÍÃ×ÓÖí wrote:
&gt; &gt; Currently, I am trying to port jemalloc to musl, I have found a issue "the return value of pthread_getspecific is not correct". The reasons are as follows:
&gt; &gt; 1, Jemalloc uses pthread_key_t to implement cache feature, if codes call malloc, pthread_create_key will called and tsd will be initizlized.
&gt; &gt; 2, Musl calls malloc before updating TLS size in dl stage 3.
&gt; &gt; 3, New created initial_tls doesn't carry builtin_tls's tsd.
&gt; &gt; 
&gt; &gt; 
&gt; &gt; The attached patch could fix this issue, please review it, thanks.
&gt; An interposed malloc being reachable before the crt1 entry point is a
&gt; bug that needs to be fixed. This is a context where it's not valid to
&gt; call any application-provided code. Where does the call happen from?
&gt; dynlink.c itself uses the internal malloc but I guess there's
&gt; somewhere the interposable malloc is getting called indirectly from.

I went looking for it and couldn't find any sign of malloc
reachability unless you go back to 1.2.1. Commit
c1e5d243b7e39b2fbfb17144608ce045575d8e95 removed the use via stdio,
and 34952fe5de44a833370cbe87b63fb8eec61466d7 switched to internal
malloc for all direct use from ldso. Are you just using a really old


[-- Attachment #2: Type: text/html, Size: 2416 bytes --]

      reply	other threads:[~2023-02-15  1:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14  7:25 [musl][PATCH]fix tsd's issue =?gb18030?B?zcPX09bt?=
2023-02-14 12:05 ` Rich Felker
2023-02-14 13:44   ` Rich Felker
2023-02-15  1:45     ` =?gb18030?B?zcPX09bt?= [this message]

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* 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

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).