From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id BF2F53858C53 for ; Fri, 9 Feb 2024 07:42:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BF2F53858C53 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BF2F53858C53 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707464546; cv=none; b=FcDbmzwB9L6W8uSSHtYwVt4uJt70+8FPBHOOlu+AZmLBuAM725bRXOclnXhP3IY2MTbXnAijuVJ3c89El23IcqQZLnSyfB4In/gNOBBMrJ7ESiUkVkLWITdxLOnKRxzAcM6U9d18sspsRWe+qgpFp3QDvgrHNL2PBVXiBWOmqbI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707464546; c=relaxed/simple; bh=oGnwsEfM0gfimdzzxGy5G6LeO2IKwSEmq9iX6oXQVFE=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=HLn91Jyf62qZiiLORmPtud3jvPaksVtIeHFvxMb4d4ujZ5rRism99Zpb8Gk9jW2zinby0Q5ANzbcTFfBnk04XnIeDdzz9ocKkZWNYzeLbJigQ0/ReksXQ+Hew/hAoHW7xhnZoK3ppuxAeeC5UI5Yaj9asS1bEwceoXVfx+UnF1o= ARC-Authentication-Results: i=1; server2.sourceware.org References: User-agent: mu4e 1.10.8; emacs 30.0.50 From: Sam James To: Deepthi H Cc: gcc-help@gcc.gnu.org Subject: Re: Sanitizer CHECK failed: sanitizer_allocator_primary64.h:133 Date: Fri, 09 Feb 2024 07:42:05 +0000 Organization: Gentoo In-reply-to: Message-ID: <875xyyt76u.fsf@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,KAM_NUMSUBJECT,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Deepthi H via Gcc-help writes: > Hi all, > > I am facing the issue on enabling sanitizers for gcc on aarch64 linux. > The issue was observed with the following command :- > "aarch64-poky-linux-gcc -O1 -fsanitize=3Daddress -fno-omit-frame-pointer = -o > test test.c" > > *AddressSanitizer: CHECK failed: sanitizer_allocator_primary64.h:131 > "((kSpaceBeg)) =3D=3D ((address_range.Init(TotalSpaceSize, > PrimaryAllocatorName, kSpaceBeg)))" (0x600000000000, 0xfffffffffffffff4) > (tid=3D389) * > > I found a patch that fixes the sanitizer issue for arm64 on llvm :- > =E2=9A=99D60243 [LSan][AArch64] Speed-up leak and address sanitizers on A= Arch64 for > 48-bit VMA (llvm.org) That should've been synced into GCC ages ago. What version of GCC are you using? > > I analyzed and tried to port the patch that fixes the issue for llvm. Aft= er > backporting the LLVM patches to the GCC sources, I encountered several > build errors, particularly related to the AddressSanitizer (ASan) and > LeakSanitizer (LSan) libraries. I have fixed lsan and asan issues. However > sanitizer_common is completely different in gcc than llvm. > Can you please help me fix this issue on gcc sources or is than any other > way to fix this issue. > > Thanks in advance, > Deepthi