From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RDNS_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 20070 invoked from network); 10 Mar 2020 23:41:25 -0000 Received-SPF: pass (mother.openwall.net: domain of lists.openwall.com designates 195.42.179.200 as permitted sender) receiver=inbox.vuxu.org; client-ip=195.42.179.200 envelope-from= Received: from unknown (HELO mother.openwall.net) (195.42.179.200) by inbox.vuxu.org with ESMTP; 10 Mar 2020 23:41:25 -0000 Received: (qmail 26202 invoked by uid 550); 10 Mar 2020 23:41:23 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 26181 invoked from network); 10 Mar 2020 23:41:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=igT0QrXaDDObIsBEXgrQwHsAIlrOIrl7ZM8yMiwzvTI=; b=UUa1HwV7C/OFFhMhCTHBQw3TeXZhQy7qwhxeAmTwxIrMiTLPT3sqA/ALn8JSMV3e36 yelT8l39G/KO2In+Rdw8V15b706qFnU5CktCgsQmCIc6Ks2kk9ebb+D715zFw1vndJ01 Rxp6WtIibSEKostK2uFMTEnE5KGk4Ff4PTTyNOlMRBVfIY/qHTcurh+BgfUSe1PU/eSF +ycHyHZHaszRepr5O3O1WFlhfrSM6tYUkCbVwWw0A6G959LV5y3E6iU9WmElGYF6JKyg mjz3x/p8fxpJoZV15hqF8o4Gwdakpxrpd8eh6dj7aCIpgWC5B5rFcwIb8V2jTAKckD40 N3Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=igT0QrXaDDObIsBEXgrQwHsAIlrOIrl7ZM8yMiwzvTI=; b=qnSiV1K8kyHZnjzyOQF1d1DacG6Gt5agxd0hxuG8gGsftsWA0jMTGkNyQrGaOD+cez VpaKTBmeyYwyTHC81YNW6lJA/fiok/fVW7fXFadaUTPKn8WiZv/b2ryVSka1/pSxKEdl V3UVZUkv/RZ8myXvFyf1AX+qIndg3Jb9YGaYPQIWn1ki0bxm+C+Qs5tHRcI3JDUPJ0gt pZ6mkIPy5j7S8w7kTJ4wJwrFQwL7HSWtHRBaIEI0G5fnuDcGxfpUndl/xvaeSaX1MW/4 v0qifoTGYCC1tuaDqF3YXZVYQNaGaSKseuxYIa4+v9oAyAh1oa7uS9YHXsOnYT6qa3kJ CzLQ== X-Gm-Message-State: ANhLgQ2E8pA2iBGReHWrrjZtXtO3ihdOK3CGTYzLpqkUvp4/TFQ3G0EK VP+58eOAY4CqhDhlt9EWQ6T1WiTQlRW3wEEkVpU6eJtA X-Google-Smtp-Source: ADFU+vvmoADZCxgZxATEZU3nnVXdAMHJBty/UCH7b2BHXRAjOXQiSbz61ZJff9BjAfjq6NM3+DVhbkq7V1PxLSoEdmk= X-Received: by 2002:a67:f41a:: with SMTP id p26mr359005vsn.222.1583883670495; Tue, 10 Mar 2020 16:41:10 -0700 (PDT) MIME-Version: 1.0 References: <20200310095949.GJ14278@port70.net> <20200310134113.GZ11469@brightrain.aerifal.cx> <20200310154754.GA11469@brightrain.aerifal.cx> <20200310201704.GB11469@brightrain.aerifal.cx> In-Reply-To: <20200310201704.GB11469@brightrain.aerifal.cx> From: Andre McCurdy Date: Tue, 10 Mar 2020 16:40:58 -0700 Message-ID: To: musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] musl and jemalloc support On Tue, Mar 10, 2020 at 1:17 PM Rich Felker wrote: > On Tue, Mar 10, 2020 at 12:52:27PM -0700, Andre McCurdy wrote: > > On Tue, Mar 10, 2020 at 8:48 AM Rich Felker wrote: > > > On Tue, Mar 10, 2020 at 03:04:48PM +0100, Kaisrl=C3=ADk, Jan wrote: > > > > On Tue, Mar 10, 2020 at 2:41 PM Rich Felker wrote= : > > > > > On Tue, Mar 10, 2020 at 12:08:57PM +0100, Kaisrl=C3=ADk, Jan wrot= e: > > > > > > > the fact that you have libpthread.so means it's not a musl sy= stem > > > > > > > and preloading a libpthread.so from another libc is expected = to > > > > > > > crash. (even on other systems you should not just preload lib= pthread, > > > > > > > but libjemalloc should have it in its dependencies if needed.= ) > > > > > > > > > > > > Sorry, I kept libpthread from one of my previous tests which is= slightly > > > > > > misleading in this case. My system has only one libpthread libr= ary coming > > > > > > from musl. > > > > > > > > > > musl has no libpthread.so, only libpthread.a (which is empty). If= you > > > > > have a libpthread.so, something probably went badly wrong in sett= ing > > > > > up your system. > > > > > > > > Thank you for pointing this. Fortunately, it is symlink to libc. > > > > > > > > ls -la usr/lib/libpthread.so > > > > lrwxrwxrwx 1 X X 7 Mar 5 15:02 usr/lib/libpthread.so -> libc.so > > > > > > That's still wrong. Recent musl will go out of its way to prevent you > > > from shooting yourself in the foot like that, but older musl will blo= w > > > up horribly. In either case the file should not exist. > > > > OpenEmbedded provides those symlinks (although some are only as part > > of a glibc compatibility package and so not generally exposed to > > users): > > > > https://git.openembedded.org/openembedded-core/tree/meta/recipes-core= /musl/musl_git.bb#n73 > > > > Is that wrong? > > Yes, it's wrong, and will lead to incorrect linking if these symlinks > are present when linking applications. Their presence does not help > with anything (glibc compat or otherwise) because musl's dynamic > linker intercepts these names and does not search for files. > > If you really really really think you need them for some runtime > reason for some application, they should probably be empty .so files > rather than symlinks to libc, and they should be in a directory where > they won't be searched by ld at link time. But it's almost certain > that whatever the motivation for putting them there in the first place > was based on a misunderstanding. Thanks. Khem created the links. Hopefully he's reading this and will either remove them or continue the thread if anything else needs clarification.