From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 292103858D38; Mon, 27 Feb 2023 08:32:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 292103858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677486771; bh=UFdj18xGMhTE+Yh6ElyuNyRbi2hAGgHYIYqficbo7/c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=C+2QCxUfXcwFSMpHANE4bwg/k+2F5Lrp66goqB9TkJOdoEeyzIZWYGJkrD+EFUWLe tqdTSKq16j8ioN9+fUTajCdPJ4n1hk8VHx3SyAuzwAMf+yakbOryCPEgpISiSdHC9C fgLy76iOc6OSL8QRDSbn94Xbwf95VYNNFceRwXZk= From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/108834] LTO: ltrans temporary file is used as module name in ASAN Date: Mon, 27 Feb 2023 08:32:45 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution 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=3D108834 Martin Li=C5=A1ka changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #13 from CVS Commits --- The releases/gcc-12 branch has been updated by Martin Liska : https://gcc.gnu.org/g:b8e496d132ec087c9db5951fea23551dcc831d8c commit r12-9207-gb8e496d132ec087c9db5951fea23551dcc831d8c Author: Martin Liska Date: Fri Feb 17 15:11:02 2023 +0100 asan: adjust module name for global variables As mentioned in the PR, when we use LTO, we wrongly use ltrans output file name as a module name of a global variable. That leads to a non-reproducible output. After the suggested change, we emit context name of normal global variables. And for artificial variables (like .Lubsan_data3), we use aux_base_name (e.g. "./a.ltrans0.ltrans"). PR sanitizer/108834 gcc/ChangeLog: * asan.cc (asan_add_global): Use proper TU name for normal global variables (and aux_base_name for the artificial one). gcc/testsuite/ChangeLog: * c-c++-common/asan/global-overflow-1.c: Test line and column info for a global variable. (cherry picked from commit 94c9b1bb79f63d000ebb05efc155c149325e332d) --- Comment #14 from Martin Li=C5=A1ka --- Fixed now.=