]> gcc.gnu.org Git - gcc.git/commit
asan: adjust module name for global variables marxin/heads/PR108834-asan-tu-name
authorMartin Liska <mliska@suse.cz>
Fri, 17 Feb 2023 14:11:02 +0000 (15:11 +0100)
committerMartin Liska <mliska@suse.cz>
Fri, 24 Feb 2023 08:56:51 +0000 (09:56 +0100)
commitc2498e700a5ec63be3d598776365adba16091c47
tree17d157404f3f87a25bb09be24dad990480805201
parentcab2636174feaec4f12fb8a2d09b1f8dd3bcdf3c
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 asan/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.
gcc/asan.cc
gcc/testsuite/c-c++-common/asan/global-overflow-1.c
This page took 0.062045 seconds and 6 git commands to generate.