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



             Bug #: 55380

           Summary: All search_line_fast implementations read beyond

                    buffer

    Classification: Unclassified

           Product: gcc

           Version: 4.8.0

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: bootstrap

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: hjl.to...@gmail.com

        Depends on: 54691





Similar to PR 54691, GCC built with -faddress-sanitizer leads

to



==7876== ERROR: AddressSanitizer heap-buffer-overflow on address 0x7f3484513ff0

at pc 0x1e792db bp 0x7fffbed86340 sp 0x7fffbed86338

READ of size 16 at 0x7f3484513ff0 thread T0

    #0 0x1e792da

(/export/build/gnu/gcc-asan/build-x86_64-linux/gcc/cc1+0x1e792da)

0x7f3484513ff0 is located 0 bytes to the right of 4021-byte region

[0x7f3484513040,0x7f3484513ff5)

allocated by thread T0 here:

    #0 0x1f2d48c

(/export/build/gnu/gcc-asan/build-x86_64-linux/gcc/cc1+0x1f2d48c)

    #1 0x1f2609c

(/export/build/gnu/gcc-asan/build-x86_64-linux/gcc/cc1+0x1f2609c)

Shadow byte and word:

  0x1fe6908a27fe: 5

  0x1fe6908a27f8: 00 00 00 00 00 00 05 fb



[hjl@gnu-tools-1 gcc]$ addr2line -e cc1 0x1e792da 

/export/gnu/import/git/sources/gcc/libcpp/lex.c:393

[hjl@gnu-tools-1 gcc]$ 



All search_line_fast implementations read beyond buffer.

Reply via email to