[Bug sanitizer/55799] New: AddressSanitizer with `-pg' option results in spurious errors

ai.azuma at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun Dec 23 14:26:00 GMT 2012


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

             Bug #: 55799
           Summary: AddressSanitizer with `-pg' option results in spurious
                    errors
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: sanitizer
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ai.azuma@gmail.com
                CC: dodji@gcc.gnu.org, dvyukov@gcc.gnu.org,
                    jakub@gcc.gnu.org, kcc@gcc.gnu.org


Created attachment 29036
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29036
Command-line log

The following simple program

//---------
int main()
{
  return 0;
}
//---------

results in spurious errors when compiled with `-fsanitize=address' and `-pg'.

$ gcc -pg -fsanitize=address main.cpp

$ ./a.out
=================================================================
==829== ERROR: AddressSanitizer: attempting free on address which was not
malloc()-ed: 0x7f1e242d55a0
    #0 0x7f1e21ebfa4e
(/home/cryolite/local/gcc-snapshot/lib64/libasan.so.0.0.0+0xfa4e)
    #1 0x327f235db1 (/lib64/libc-2.12.so+0x35db1)
Stats: 0M malloced (0M for red zones) by 0 calls
Stats: 0M realloced by 0 calls
Stats: 0M freed by 0 calls
Stats: 0M really freed by 0 calls
Stats: 0M (0 full pages) mmaped in 0 calls
  mmaps   by size class:
  mallocs by size class:
  frees   by size class:
  rfrees  by size class:
Stats: malloc large: 0 small slow: 0
==829== ABORTING



More information about the Gcc-bugs mailing list