From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 27156 invoked from network); 20 Jan 2021 16:04:36 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 20 Jan 2021 16:04:36 -0000 Received: (qmail 26300 invoked by uid 550); 20 Jan 2021 16:04:32 -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 9722 invoked from network); 20 Jan 2021 15:45:45 -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; bh=hfrFfi7s94qujR3z4e2+d4TicSwMzrVPmgXSeA9FVTI=; b=OuSNCwqLn50Y2CwbtfxUu/QqvCft4jYei7FtoorBTBnrhpBe0ypmyO3iqWxA/p4Ej7 iThtgyg8rzNcgokcGuGQJbmAgo3y4HDTEy65SZXHIIG+05zldv4toxSkt+5tCXmXf9fN umQehVFrp5EKHXryM3esdyIJxQ2AkIgoVkHho0puHRt6SsgEcejoZauq9aeUB3ayGhIQ YmgBet2c1NaAIExUM1Qbos44qViVs27CxM6k+Oq5qXqQ5GfYUN6zszYuWVqRacAOgVMW hZ5fS344IwkbXrP4LRrBdZfv5s+CXdVgdPdPfbEBiixtbpIrbe5kO3QA/AS26RcQYlvp QWdQ== 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; bh=hfrFfi7s94qujR3z4e2+d4TicSwMzrVPmgXSeA9FVTI=; b=r0xhZBAn0M1YII9Ep40//JGwO4uSQaCTRzyz1IK6ptn5IQUnio1tdJL4WZ2kb6lKmh uEdqQ4zf6S+bKUwJQV4E0/qfLMdQzCwckR7sXqfBArF55ZdLFntfYTEbvjZBMaceFmVo nkGkHV66AyHROAIyJxfbYcqHcAFeGMtWu86SssnISqgPVF12puw4vLGqgS3ILpo0TlN5 zh0HnZwQePcjyGoVfCUGdEPKOXyAJ81gxv07aLrHDCQzN5m6mzWRpVET9nqH9vYgJXp0 uNANUGiwp2RuL4TRSXqLVxAv+Z9baZWXoki3NxXPedgfNmQC/SDMmxLGcEPeQJu+eh8R 3+Fg== X-Gm-Message-State: AOAM533AdUhhUbZ+5yNqc0nrCfnljmEbAjpUk4F4ObOyBc1y4jBI/U3z C+Sb+UW9UOozfOBOP0CJjBkMhbLxAdJ5b0uhrdL9Bri6mxI= X-Google-Smtp-Source: ABdhPJz48990VqdLW9F42oYsm9hiacoNskQc6tZYgfaBJIdQXNs1XlPlLM7ibgiz4FGxCnL7vHvIOKMt5KQgMmTczD8= X-Received: by 2002:aa7:c7d8:: with SMTP id o24mr8045716eds.328.1611157534278; Wed, 20 Jan 2021 07:45:34 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Yuriy Chernyshov Date: Wed, 20 Jan 2021 18:45:23 +0300 Message-ID: To: musl@lists.openwall.com Content-Type: multipart/alternative; boundary="00000000000082088c05b956d815" Subject: [musl] Re: Typo in atexit.c (?) --00000000000082088c05b956d815 Content-Type: text/plain; charset="UTF-8" As I see, this turned out to be a combination of a local patch applied to atexit.c. The patch introduces cleanup of additionally allocated fl chunks allocated by calloc calls in __cxa_atexit. I think I can upstream the patch upon a brief adaptation to match the styleguide. What do you think? NB: I am not a subscriber of this list and would like to be cc'd with any replies. Thanks in advance. Yuriy. On Wed, 20 Jan 2021 at 16:54, Yuriy Chernyshov wrote: > Hello everyone, > 34952fe5de44a833370cbe87b63fb8eec61466d7 introduced safeguard for using of > undefined memory (de)allocation functions: > https://git.musl-libc.org/cgit/musl/commit/?id=34952fe5de44a833370cbe87b63fb8eec61466d7 > > However, in src/exit/atexit.c either this commit or the code is buggy, as > it has: > > #define free undef > > ... free(something) > > This results in linkage error of every program being linked to musl. > Could you, please, advice me on how to fix this? > > Regards, > Yuriy. > --00000000000082088c05b956d815 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
As I see, this turned out to be a combination of a lo= cal patch applied to atexit.c.

The patch introduce= s cleanup of additionally allocated fl chunks allocated by calloc calls in = __cxa_atexit.
I think I can upstream the patch upon a brief adapt= ation to match the styleguide.

What do you think?<= /div>

NB: I am not a subscriber of this list and would l= ike to be cc'd with any replies.
Thanks in advance.

Yuriy.

On Wed, 20 Jan 2021 at 16:54, Yuriy Chernys= hov <georgt= hegreat@gmail.com> wrote:
Hello everyone,
34952fe5de44a833370cbe87b63fb8eec61466d7 int= roduced safeguard for using of undefined memory (de)allocation functions: <= a href=3D"https://git.musl-libc.org/cgit/musl/commit/?id=3D34952fe5de44a833= 370cbe87b63fb8eec61466d7" target=3D"_blank">https://git.musl-libc.org/cgit/= musl/commit/?id=3D34952fe5de44a833370cbe87b63fb8eec61466d7
However, in src/exit/atexit.c either this commit or the code i= s buggy, as it has:

#define free undef
<= br>
... free(something)

This results in = linkage error of every program being linked to musl.
Could you, p= lease, advice me on how to fix this?

Regards,
Yuriy.
--00000000000082088c05b956d815--