From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AF3233882053; Thu, 13 Jun 2024 14:57:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AF3233882053 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1718290677; bh=9Tj8bfjqrP1zPcLZVbs1fwOhOv1J2fTwkXmgVfl12f4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YavG2G8P5NlRfpqcMI5nDtutedJg0AqAZvApJZ7os17yg7fXI4Kb/xd3ai1hIK7GL ttDC775DALPgJRKDbZOf8ve/lkAAHRzDUE0oY4bUmAYHv5RAGrMyV3Ob+kP/57KbcA WG8ao0UpIXkkPw0j8L2k74KMjDUdf1DeCRe0fpMM= From: "iii at linux dot ibm.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/115461] lsan doesn't work on s390x Date: Thu, 13 Jun 2024 14:57:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 14.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: iii at linux dot ibm.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D115461 --- Comment #5 from Ilya Leoshkevich --- The LLVM testsuite still passes. Looking a bit deeper: $ LSAN_OPTIONS=3Dverbosity=3D1,log_pointers=3D1 ./a.out [...] 0x508000000000 =3D=3D1522380=3D=3DLeakSanitizer: checking for leaks [...] =3D=3D1522381=3D=3DScanning STACK range 0x03ffffffa3d8-0x03ffffffb000. =3D=3D1522381=3D=3D0x03ffffffa820: found 0x508000000000 pointing into chunk 0x508000000000-0x50800000007b of size 123. So something spilled the pointer value on stack, and LSan thinks that it's still referenced. And indeed, turning stack scanning off resolves the issue: $ LSAN_OPTIONS=3Duse_stacks=3D0 ./a.out 0x508000000000 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D1522412=3D=3DERROR: LeakSanitizer: detected memory leaks Direct leak of 123 byte(s) in 1 object(s) allocated from: #0 0x2aa00045bbd in malloc [...]/llvm-project/compiler-rt/lib/lsan/lsan_interceptors.cpp:75:3 #1 0x2aa0004779d in main ([...]/llvm-project/build/a.out+0x4779d) SUMMARY: LeakSanitizer: 123 byte(s) leaked in 1 allocation(s).=