From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from burlywood.elm.relay.mailchannels.net (burlywood.elm.relay.mailchannels.net [23.83.212.26]) by sourceware.org (Postfix) with ESMTPS id D2F953858410 for ; Wed, 17 Nov 2021 03:44:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D2F953858410 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 3C3308618A5; Wed, 17 Nov 2021 03:44:23 +0000 (UTC) Received: from pdx1-sub0-mail-a306.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 97F8F8618C6; Wed, 17 Nov 2021 03:44:22 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a306.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.100.11.72 (trex/6.4.3); Wed, 17 Nov 2021 03:44:23 +0000 X-MC-Relay: Junk X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Eight-Grain: 5f4b2a73460176fb_1637120663109_1065207062 X-MC-Loop-Signature: 1637120663109:2878284691 X-MC-Ingress-Time: 1637120663109 Received: from [192.168.1.174] (unknown [1.186.223.33]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a306.dreamhost.com (Postfix) with ESMTPSA id 4Hv81d1CPyz1W8; Tue, 16 Nov 2021 19:44:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gotplt.org; s=gotplt.org; t=1637120662; bh=gz1AzrZgWu1WEzCLYuihob43oQM=; h=Date:Subject:To:From:Content-Type:Content-Transfer-Encoding; b=MjE8lPi0qlzrOPsnI0g6wjh2LNoZV4MQMUvqJ7w63rFD3VzPFYpzWt4/W1KdTKex3 +Mm/u5LQppZnPU924cTt63rl9EKwPQbAK708Yd0jX6RaJHwQPeGAq1k7mwe//6/F46 38kW3Vkjx/rqaBXjOi7Gl4wauEekDIFMtFX96WWc= Message-ID: <232c045f-6f93-6f2a-2e86-7e22f653b77f@gotplt.org> Date: Wed, 17 Nov 2021 09:14:15 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH v2] malloc: Fix malloc debug for 2.35 onwards Content-Language: en-US To: Stafford Horne , GLIBC patches References: <20211116213225.3032782-1-shorne@gmail.com> From: Siddhesh Poyarekar In-Reply-To: <20211116213225.3032782-1-shorne@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3038.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_MSPIKE_BL, RCVD_IN_MSPIKE_ZBI, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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: Wed, 17 Nov 2021 03:44:26 -0000 On 11/17/21 03:02, Stafford Horne wrote: > The change 1e5a5866cb ("Remove malloc hooks [BZ #23328]") has broken > ports that are using GLIBC_2_35, like the new OpenRISC port I am working > on. > > The libc_malloc_debug.so library used to bring in the debug > infrastructure is currently essentially empty for GLIBC_2_35 ports like > mine causing mtrace tests to fail: > > cat sysdeps/unix/sysv/linux/or1k/shlib-versions > DEFAULT GLIBC_2.35 > ld=ld-linux-or1k.so.1 > > FAIL: posix/bug-glob2-mem > FAIL: posix/bug-regex14-mem > FAIL: posix/bug-regex2-mem > FAIL: posix/bug-regex21-mem > FAIL: posix/bug-regex31-mem > FAIL: posix/bug-regex36-mem > FAIL: malloc/tst-mtrace. > > The issue seems to be with the ifdefs in malloc/malloc-debug.c. The > ifdefs are currently essentially exluding all symbols for ports > 2.35. > > Removing the top level SHLIB_COMPAT ifdef allows things to just work. LGTM. I verified that the only change to the build in x86_64 is in the debug sections to account for change in line numbers. Reviewed-by: Siddhesh Poyarekar > > Fixes: 1e5a5866cb ("Remove malloc hooks [BZ #23328]") > Cc: Siddhesh Poyarekar > --- > > Changes since v2: > - Just remove SHLIB_COMPAT, using compat_symbol seems to do what > Siddhesh was explaining he wanted to do. > > malloc/malloc-debug.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/malloc/malloc-debug.c b/malloc/malloc-debug.c > index 3d7e6d44fd..99aa95b145 100644 > --- a/malloc/malloc-debug.c > +++ b/malloc/malloc-debug.c > @@ -24,7 +24,6 @@ > #include > #include > > -#if SHLIB_COMPAT (libc_malloc_debug, GLIBC_2_0, GLIBC_2_34) > /* Support only the glibc allocators. */ > extern void *__libc_malloc (size_t); > extern void __libc_free (void *); > @@ -669,4 +668,3 @@ compat_symbol (libc_malloc_debug, __free_hook, __free_hook, GLIBC_2_0); > compat_symbol (libc_malloc_debug, __malloc_hook, __malloc_hook, GLIBC_2_0); > compat_symbol (libc_malloc_debug, __realloc_hook, __realloc_hook, GLIBC_2_0); > compat_symbol (libc_malloc_debug, __memalign_hook, __memalign_hook, GLIBC_2_0); > -#endif >