public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/60861] New: out of bounds access of  global var in .rodata/.bss not detected
@ 2014-04-16 15:17 jan.smets@alcatel-lucent.com
  2014-04-16 19:02 ` [Bug sanitizer/60861] " kcc at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jan.smets@alcatel-lucent.com @ 2014-04-16 15:17 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60861
           Summary: out of bounds access of  global var in .rodata/.bss
                    not detected
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jan.smets@alcatel-lucent.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

gcc version 4.8.2 (Debian 4.8.2-16) 
gcc test.c -O2 -fsanitize=address -o test 

int depth = 3;

//int testGlobalOutOfBoundsRODATAVar[2] = {1}; /* data: works
(asan_report_load4 present) */
const int testGlobalOutOfBoundsRODATAVar[1] = {1}; /* rodata: doesn't work (no
asan_report_load4 present) */
//int testGlobalOutOfBoundsRODATAVar[1] = {0}; /* bss : works
(asan_report_load4 present) */
//int testGlobalOutOfBoundsRODATAVar[1];  /* bss : doesn't work !???
(asan_report_load4 present!)  */


int test(void)
{
    return testGlobalOutOfBoundsRODATAVar[depth]; // boom
}

int main(void)
{
    return test();
}


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

end of thread, other threads:[~2014-04-17  9:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-16 15:17 [Bug sanitizer/60861] New: out of bounds access of global var in .rodata/.bss not detected jan.smets@alcatel-lucent.com
2014-04-16 19:02 ` [Bug sanitizer/60861] " kcc at gcc dot gnu.org
2014-04-16 21:33 ` jan.smets@alcatel-lucent.com
2014-04-17  5:00 ` y.gribov at samsung dot com
2014-04-17  5:04 ` pinskia at gcc dot gnu.org
2014-04-17  6:32 ` y.gribov at samsung dot com
2014-04-17  8:30 ` kcc at gcc dot gnu.org
2014-04-17  9:13 ` jakub 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).