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

            Bug ID: 108834
           Summary: LTO: ltrans temporary file is used as module name in
                    ASAN
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                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, marxin at 
gcc dot gnu.org
  Target Milestone: ---

We originally noticed that accidentally in openSUSE bugzilla:
https://bugzilla.opensuse.org/show_bug.cgi?id=1208386

$ cat jhead.i
int foo;

$ gcc -flto -fsanitize=address jhead.i -shared -fPIC -o jhead && md5sum jhead
4e0fb88f928272b4962c6dcd8b845d71  jhead
$ gcc -flto -fsanitize=address jhead.i -shared -fPIC -o jhead && md5sum jhead
e3c77e7ce9d54afb812add5b87a254d1  jhead

$ strings jhead | grep ltrans
/tmp/ccIzP3oh.ltrans0.o

it comes from ASAN module name:

...
.LC2:
        .string "./jhead.ltrans0.o"
        .section        .data.rel,"aw"
        .align 32
        .type   .LASAN0.2, @object
        .size   .LASAN0.2, 64
.LASAN0.2:
        .quad   .LASAN1.0
        .quad   4
        .quad   64
        .quad   .LC1
        .quad   .LC2

which is main_input_filename:
gcc/asan.cc:3290

Anyway, I can fix it.

Reply via email to