Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22077

Understanding ASAN summary

$
0
0

The example below is from an ASAN report caused by heap-use-after-free on address 0x6040000a06b0 How would I be able to tell that this was a heap use after free error solely from looking at this summary?

SUMMARY: AddressSanitizer: heap-use-after-free /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:826 in __interceptor_memcmp
Shadow bytes around the buggy address:
  0x0c088000c080: fa fa fa fa fd fd fd fa fa fa fa fa fd fd fd fa
  0x0c088000c090: fa fa fa fa fd fd fd fa fa fa fa fa fd fd fd fa
  0x0c088000c0a0: fa fa fa fa fd fd fd fa fa fa fa fa fd fd fd fa
  0x0c088000c0b0: fa fa fa fa fd fd fd fd fa fa fa fa 00 00 00 fa
  0x0c088000c0c0: fa fa fa fa 00 00 00 fa fa fa fa fa 00 00 00 fa
=>0x0c088000c0d0: fa fa fa fa fd fd[fd]fa fa fa fa fa 00 00 00 fa
  0x0c088000c0e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c088000c0f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c088000c100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c088000c110: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c088000c120: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc

In greater scope, I am wondering what information I should be extracting and how do I interpret what the error is specifically from the above summary. Would one be able to preemptively see additional ASAN errors if they happened to appear in this summary?


Viewing all articles
Browse latest Browse all 22077

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>