https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125980

            Bug ID: 125980
           Summary: RFC: asan: route global descriptor filenames
           Product: gcc
           Version: 15.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: andrej.kozemcak at siemens dot com
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
  Target Milestone: ---

Created attachment 64848
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64848&action=edit
Proposal patch how fix the issue

Hi,

The ASAN globals instrumentation embeds the source filename into the
generated code. We hit this issue when we build our projects in
Yocto/OpenEmbedded
cross build. We enable ASAN in our pipelines and then Yocto build fails QA
check [buildpaths] because of the unmapped TMPDIR path. With AI help we found
the issue and prepare a paths witch fix that issue, see attachment files. Patch
also contains details descriptions about the issue. I don't understand GCC
codebase well and have less knowledge about that problematic. Because that we
don't want directly send the patch to gcc, but rather open this RFC bug to know
your opinions what you think about the issue and patch, which we prepare with
AI help.

Thank you

PS: Similar error we hit also in coverage, create separate "bug" for that

Example command which flags we use:

/projects/ccp-sd/tmp/work/armv8a-ccp-linux/ba-lms/2.3.0/recipe-sysroot-native/usr/bin/aarch64-ccp-linux/aarch64-ccp-linux-clang++
--sysroot=/projects/ccp-sd/tmp/work/armv8a-ccp-linux/ba-lms/2.3.0/recipe-sysroot
 -I/home/projects/ba/ba-lms/include -I/home/projects/ba/ba-lms/src
-march=armv8-a+crc+crypto -mbranch-protection=standard  --dyld-prefix=/usr
-fstack-protector-strong  -U_FORTIFY_SOURCE -Wformat -Wformat-security
-Werror=format-security 
--sysroot=/projects/ccp-sd/tmp/work/armv8a-ccp-linux/ba-lms/2.3.0/recipe-sysroot
 -fsanitize=address -Og -g  
-ffile-prefix-map=/home/projects/ba/ba-lms=/usr/src/debug/ba-lms/2.3.0 
-ffile-prefix-map=/projects/ccp-sd/tmp/work/armv8a-ccp-linux/ba-lms/2.3.0/ba-lms-2.3.0=/usr/src/debug/ba-lms/2.3.0

-ffile-prefix-map=/projects/ccp-sd/tmp/work/armv8a-ccp-linux/ba-lms/2.3.0/recipe-sysroot=

-ffile-prefix-map=/projects/ccp-sd/tmp/work/armv8a-ccp-linux/ba-lms/2.3.0/recipe-sysroot-native=
 -pipe -fvisibility-inlines-hidden -std=gnu++17 -MD -MT
tests/CMakeFiles/ba-lms-test.dir/Data.cpp.o -MF
tests/CMakeFiles/ba-lms-test.dir/Data.cpp.o.d -o
tests/CMakeFiles/ba-lms-test.dir/Data.cpp.o -c
/home/projects/ba/ba-lms/tests/Data.cpp

Reply via email to