public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/55739] New: asan doesn't work on common symbols
@ 2012-12-19 13:20 hjl.tools at gmail dot com
  2012-12-19 13:26 ` [Bug sanitizer/55739] " jakub at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: hjl.tools at gmail dot com @ 2012-12-19 13:20 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55739

             Bug #: 55739
           Summary: asan doesn't work on common symbols
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com
                CC: dodji@gcc.gnu.org, dvyukov@gcc.gnu.org,
                    jakub@gcc.gnu.org, kcc@gcc.gnu.org


[hjl@gnu-6 bound-1]$ cat c.c
#include <stdio.h>

int c[30];

void
foo (int a[])
{
  printf ("10: %d\n", a[10]);
}
[hjl@gnu-6 bound-1]$ cat m.c
#include <stdio.h>

extern int c[];

void foo (int []);

int
main ()
{
  c[30] = 1;
  foo (c);
  printf ("30: %d\n", c[30]);
  return 0;
}
[hjl@gnu-6 bound-1]$ make
/export/build/gnu/gcc/build-x86_64-linux/gcc/../../release/usr/gcc-4.8.0/bin/gcc
-fsanitize=address -O -static-libasan   -c -o m.o m.c
/export/build/gnu/gcc/build-x86_64-linux/gcc/../../release/usr/gcc-4.8.0/bin/gcc
-fsanitize=address -O -static-libasan   -c -o c.o c.c
/export/build/gnu/gcc/build-x86_64-linux/gcc/../../release/usr/gcc-4.8.0/bin/gcc
-fsanitize=address -O -static-libasan -o x m.o c.o
./x
10: 0
30: 1
[hjl@gnu-6 bound-1]$


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-08-07 23:12 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-19 13:20 [Bug sanitizer/55739] New: asan doesn't work on common symbols hjl.tools at gmail dot com
2012-12-19 13:26 ` [Bug sanitizer/55739] " jakub at gcc dot gnu.org
2012-12-19 13:42 ` hjl.tools at gmail dot com
2012-12-19 13:50 ` jakub at gcc dot gnu.org
2012-12-19 16:58 ` hjl.tools at gmail dot com
2012-12-21  9:47 ` kcc at gcc dot gnu.org
2013-01-14 22:12 ` hjl.tools at gmail dot com
2013-01-15  2:20 ` hjl.tools at gmail dot com
2013-01-17 16:41 ` hjl.tools at gmail dot com
2013-01-17 16:44 ` pinskia at gcc dot gnu.org
2013-01-17 16:49 ` hjl.tools at gmail dot com
2013-01-17 16:50 ` jakub at gcc dot gnu.org
2013-01-17 16:57 ` hjl.tools at gmail dot com
2013-01-17 17:49 ` jakub at gcc dot gnu.org
2021-08-07 23:12 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).