From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x29.google.com (mail-oa1-x29.google.com [IPv6:2001:4860:4864:20::29]) by sourceware.org (Postfix) with ESMTPS id 514F33858D28 for ; Wed, 12 Apr 2023 17:33:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 514F33858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-1842cddca49so14777130fac.1 for ; Wed, 12 Apr 2023 10:33:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681320793; x=1683912793; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=sATVRtshXEBrYULssq7kSr/Mw+aqKZRiJkjhDBKFfyM=; b=xs+g8I0zpMUjV9LWuMc9bLU4mN2vc4CiBIVeCNMALfS0rCqU/fciDez0pgZObNpxdc HVWtmN7bF3zgi7jNCs2ii5JZh2i28Ozb+T4a0EGLP++vhFp3sXEGLXClqV6fJJU6zlsT 7YJIAdaf8UIxSJI3QIbNKx40UMgzVcd82X4wosRCM1XEWrA9zfsWygLP2hVdTgvMKTUH OkayUNJU1342K1mp46msfYj88vr8eSUnAlgJIE3y9+3QZIhWxdoZyBwLNOdEMxziByCj K/d3KahgXoLPM/xrsKYp+EZM9CEbl3GwRMCFZvus905BQ6Hgm2Ro0jh2c+bVdGQwgz0I Cw8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681320793; x=1683912793; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sATVRtshXEBrYULssq7kSr/Mw+aqKZRiJkjhDBKFfyM=; b=AH8kB4+hb2KbmgzGb0QDiCJ3R2WmNVrr9foKgk6caB+PddB1Ss0rCXoFchpptgQUPZ useLg79pRfBwbC4F/+NcshKwo5/JZbH6ymrCBMoRTeqiNFXmV8j3y/XTFusDXLm7hw1B K+ix30rOD09IxS8R84N1FL5gFQBI9TLtRwltbYiS+KDN7TBWidQG4l6YfGfTMvTqN/JM AwTs0IfAC3Ir+Zbi6RoUhrslZpjJBdjEfGcEepLm1IdorTMNc+emu++B6mEaKaHENLo4 c5QvcUKrCQRJdWAuOLqUfDHnL0E1Vx2dZW9B/tnikTdYRTrX1PSpESaJWVqDoBezp2hS WstA== X-Gm-Message-State: AAQBX9fiFzBVpB5BUfM1RAX7gYhbrOS0bkkJCtKdTDh3bwR5vsC7xEbG cmYkkUHO8qVqpCWuBLzFlGMhC9Atj/bxsUkfEnPWaw== X-Google-Smtp-Source: AKy350YhFHGAmeICP6IPMdGiSxQ3Hcum4XAspOGXpIP2ve5a7UMEvc86tQDG8+XWVNETXNk7zvzKhA== X-Received: by 2002:a05:6870:a793:b0:184:286b:8abc with SMTP id x19-20020a056870a79300b00184286b8abcmr9520267oao.11.1681320793589; Wed, 12 Apr 2023 10:33:13 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c2:55a1:7428:425e:4ee7:30b6? ([2804:1b3:a7c2:55a1:7428:425e:4ee7:30b6]) by smtp.gmail.com with ESMTPSA id v2-20020a9d69c2000000b006a3842a32b6sm700505oto.42.2023.04.12.10.33.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Apr 2023 10:33:11 -0700 (PDT) Message-ID: Date: Wed, 12 Apr 2023 14:33:07 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH v5 1/1] memalign: Support scanning for aligned chunks. Content-Language: en-US To: Xi Ruoyao , =?UTF-8?Q?Cristian_Rodr=c3=adguez?= Cc: DJ Delorie , libc-alpha@sourceware.org References: <610c24cb-bdf6-d31c-fb77-e7d6b2403e02@linaro.org> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 12/04/23 14:04, Xi Ruoyao wrote: > On Thu, 2023-03-30 at 18:43 -0300, Cristian Rodríguez via Libc-alpha > wrote: >> On Thu, Mar 30, 2023 at 7:50 AM Adhemerval Zanella Netto < >> adhemerval.zanella@linaro.org> wrote: >> >>> Do you have any testcase that triggers it? >> >> I'll try.. cannot compile ripgrep with debug info either ..because this >> commit also makes rustc crash with the same message.😕 > > On LoongArch (with a GCC 12.2 but LoongArch backend patched to match GCC > trunk), this causes an almost deterministic failure of malloc/tst- > malloc-thread-fail-malloc-hugetlb2: > > FAIL: malloc/tst-malloc-thread-fail-malloc-hugetlb2 > original exit status 1 > error: exit status 139 from child process > I can reproduce on x86_64 as well in a non-deterministic manner (with multiple 'rm malloc/*.out && make malloc/tests -j24'. The core file shows internal metadata corruption: $ gdb elf/ld.so core [...] #0 __pthread_kill_implementation (threadid=, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44 44 return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0; (gdb) bt #0 __pthread_kill_implementation (threadid=, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44 #1 0x00007fae15090017 in __pthread_kill_internal (signo=6, threadid=) at pthread_kill.c:78 #2 0x00007fae1503e326 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26 #3 0x00007fae150264b1 in __GI_abort () at abort.c:79 #4 0x00007fae150272cc in __libc_message (fmt=fmt@entry=0x7fae151b0632 "%s\n") at ../sysdeps/posix/libc_fatal.c:150 #5 0x00007fae1509b873 in malloc_printerr (str=str@entry=0x7fae151b3458 "free(): double free detected in tcache 2") at malloc.c:5847 #6 0x00007fae1509dd5b in _int_free (av=0x7fae1524cac0 , p=0x7fae14e00290, have_lock=0) at malloc.c:4508 #7 0x00007fae150a07bb in __GI___libc_free (mem=) at malloc.c:3386 #8 0x00007fae15445594 in ?? () #9 0x00007fae14e002a0 in ?? () #10 0x73afe8780d804600 in ?? () #11 0x00007ffec090cc68 in ?? () #12 0x00007fae1544622b in ?? () #13 0x0000000000000000 in ?? ()