From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by sourceware.org (Postfix) with ESMTPS id 36B0E3857C4A for ; Mon, 15 Nov 2021 21:07:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 36B0E3857C4A Received: by mail-pj1-x102c.google.com with SMTP id gf14-20020a17090ac7ce00b001a7a2a0b5c3so299912pjb.5 for ; Mon, 15 Nov 2021 13:07:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=NdkAXMP61KlHRYIa6OCev7S+lLshlJt7UrHoBd6jaOo=; b=vscnq+HfJRc4jcaYL2/OY/vhBD/SbOQd2VlWidYEU6z7FHWeTV6H7f4bc4m38ymC2A q78K7haYXFTE4MvkAHUYtbWfnysqp44JsmSqmdAeWRNsfl5i7WBfylzXE8FvORvZ6zLu d/yJE59F1SyE3KgD7Q+ho4k0wdcx/gfjdPgugW0vFJ8XwZrzA3xjR3Wef0NBzc93YWSQ LnEf7p7okyzvcmffE7kZcCet5xML8F+i++x/4zybU3KQbhAQM1vSw19aO9y7dhw+rAg4 TrhQi4i18pmK2pB78/ryh+7P8FmU7k6MJ5FTf/eoMZTQZdMStToVPp61WHF84lHFUT1T bPZQ== X-Gm-Message-State: AOAM5333yRl0aqvFm15fcdrRzVJTGthZDpufJ+ALnVVF+ovsdAKx1ZBr GMzELXIF9QpO7WDk6nQSjK2u4UtwWQ4= X-Google-Smtp-Source: ABdhPJx/IO8nl2QgEalJfExizlZ+yL1MufKW7HesoH812FmbZGESBXZlFTQ6u7t0pm5yLqCavmgseQ== X-Received: by 2002:a17:90b:1a88:: with SMTP id ng8mr66799187pjb.180.1637010456322; Mon, 15 Nov 2021 13:07:36 -0800 (PST) Received: from localhost ([2409:10:24a0:4700:e8ad:216a:2a9d:6d0c]) by smtp.gmail.com with ESMTPSA id p8sm17183681pfo.141.2021.11.15.13.07.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Nov 2021 13:07:35 -0800 (PST) Date: Tue, 16 Nov 2021 06:07:34 +0900 From: Stafford Horne To: Siddhesh Poyarekar Cc: GLIBC patches Subject: Re: [PATCH] malloc: Fix malloc debug for 2.35 onwards Message-ID: References: <20211113004047.1980486-1-shorne@gmail.com> <98e3b40a-3d1f-bac9-997b-22a659a1200b@gotplt.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_BLACK autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2021 21:07:38 -0000 On Mon, Nov 15, 2021 at 08:10:42AM +0530, Siddhesh Poyarekar wrote: > [sorry, hit send too soon] > > On 11/15/21 08:04, Siddhesh Poyarekar wrote: > > What symbols does this change generate?  Could you please share the > > output of objdump -T malloc/libc_malloc_debug.so from your build? > > > > Basically the idea of SHLIB_COMPAT usage here is twofold: first, to ensure > that the symbol versions in libc_malloc_debug.so are at the exact same > version as those in libc.so and second, to prevent linking against > libc_malloc_debug.so. > > In that sense, I think SHLIB_COMPAT usage is a hack. The correct way would > be to make a new macro like SHLIB_COMPAT, which creates non-default symbol > version at the latest version of the libc symbol; i.e. for your port it > would be malloc@GLIBC_2.35 and for x86_64 it would be malloc@GLIBC_2.2.5. I am not sure, after my patch the SHLIB_COMPAT usage is just there for compat symbols. As you mention using SHLIB_COMPAT to ensure libc_malloc_debug.so and libc.so have the same version seems strange, I would think that would be controlled by shlib-version or done out of the box. -Stafford