Skip to content

Instantly share code, notes, and snippets.

@gayanpathirage
Created April 7, 2016 09:09
Show Gist options
  • Save gayanpathirage/6a791caf81e39ea8d4926aeeaf71641d to your computer and use it in GitHub Desktop.
Save gayanpathirage/6a791caf81e39ea8d4926aeeaf71641d to your computer and use it in GitHub Desktop.
C++ Sanitizers Review Test Suite Results
=================================================================================================================================
== Starting Test 1
=================================================================================================================================
=================================================================
==26460==ERROR: AddressSanitizer: heap-use-after-free on address 0x61400000fe40 at pc 0x47887a bp 0x7fff2cd4c100 sp 0x7fff2cd4c0f8
READ of size 4 at 0x61400000fe40 thread T0
#0 0x478879 in useAfterFreeRead() /home/gayancp/sanitizerstestsuite/main.cpp:25
#1 0x479d9e in main /home/gayancp/sanitizerstestsuite/main.cpp:317
#2 0x7f8543d4dc35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
#3 0x415330 (/x01/exd10/bin_release/MCTester_ASAN+0x415330)
0x61400000fe40 is located 0 bytes inside of 400-byte region [0x61400000fe40,0x61400000ffd0)
freed by thread T0 here:
#0 0x450fa7 in operator delete[](void*) ../../.././libsanitizer/asan/asan_new_delete.cc:83
#1 0x478852 in useAfterFreeRead() /home/gayancp/sanitizerstestsuite/main.cpp:24
#2 0x479d9e in main /home/gayancp/sanitizerstestsuite/main.cpp:317
#3 0x7f8543d4dc35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
previously allocated by thread T0 here:
#0 0x450b3f in operator new[](unsigned long) ../../.././libsanitizer/asan/asan_new_delete.cc:52
#1 0x478818 in useAfterFreeRead() /home/gayancp/sanitizerstestsuite/main.cpp:22
#2 0x479d9e in main /home/gayancp/sanitizerstestsuite/main.cpp:317
#3 0x7f8543d4dc35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
SUMMARY: AddressSanitizer: heap-use-after-free /home/gayancp/sanitizerstestsuite/main.cpp:25 useAfterFreeRead()
Shadow bytes around the buggy address:
0x0c287fff9f70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fff9f80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fff9f90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fff9fa0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fff9fb0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c287fff9fc0: fa fa fa fa fa fa fa fa[fd]fd fd fd fd fd fd fd
0x0c287fff9fd0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c287fff9fe0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c287fff9ff0: fd fd fd fd fd fd fd fd fd fd fa fa fa fa fa fa
0x0c287fffa000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fffa010: 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
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Contiguous container OOB:fc
ASan internal: fe
==26460==ABORTING
=================================================================================================================================
=================================================================================================================================
== Starting Test 2
=================================================================================================================================
=================================================================
==26461==ERROR: AddressSanitizer: heap-use-after-free on address 0x61400000fe40 at pc 0x478901 bp 0x7fff14752ba0 sp 0x7fff14752b98
WRITE of size 4 at 0x61400000fe40 thread T0
#0 0x478900 in useAfterFreeWrite() /home/gayancp/sanitizerstestsuite/main.cpp:34
#1 0x479da8 in main /home/gayancp/sanitizerstestsuite/main.cpp:318
#2 0x7fd52cc9ac35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
#3 0x415330 (/x01/exd10/bin_release/MCTester_ASAN+0x415330)
0x61400000fe40 is located 0 bytes inside of 400-byte region [0x61400000fe40,0x61400000ffd0)
freed by thread T0 here:
#0 0x450fa7 in operator delete[](void*) ../../.././libsanitizer/asan/asan_new_delete.cc:83
#1 0x4788d9 in useAfterFreeWrite() /home/gayancp/sanitizerstestsuite/main.cpp:33
#2 0x479da8 in main /home/gayancp/sanitizerstestsuite/main.cpp:318
#3 0x7fd52cc9ac35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
previously allocated by thread T0 here:
#0 0x450b3f in operator new[](unsigned long) ../../.././libsanitizer/asan/asan_new_delete.cc:52
#1 0x47889f in useAfterFreeWrite() /home/gayancp/sanitizerstestsuite/main.cpp:31
#2 0x479da8 in main /home/gayancp/sanitizerstestsuite/main.cpp:318
#3 0x7fd52cc9ac35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
SUMMARY: AddressSanitizer: heap-use-after-free /home/gayancp/sanitizerstestsuite/main.cpp:34 useAfterFreeWrite()
Shadow bytes around the buggy address:
0x0c287fff9f70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fff9f80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fff9f90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fff9fa0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fff9fb0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c287fff9fc0: fa fa fa fa fa fa fa fa[fd]fd fd fd fd fd fd fd
0x0c287fff9fd0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c287fff9fe0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c287fff9ff0: fd fd fd fd fd fd fd fd fd fd fa fa fa fa fa fa
0x0c287fffa000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fffa010: 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
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Contiguous container OOB:fc
ASan internal: fe
==26461==ABORTING
=================================================================================================================================
=================================================================================================================================
== Starting Test 3
=================================================================================================================================
=================================================================
==26462==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61400000ffd0 at pc 0x478983 bp 0x7fffca676360 sp 0x7fffca676358
READ of size 4 at 0x61400000ffd0 thread T0
#0 0x478982 in heapOutOfBoundRead() /home/gayancp/sanitizerstestsuite/main.cpp:42
#1 0x479db2 in main /home/gayancp/sanitizerstestsuite/main.cpp:319
#2 0x7f7cc427fc35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
#3 0x415330 (/x01/exd10/bin_release/MCTester_ASAN+0x415330)
0x61400000ffd0 is located 0 bytes to the right of 400-byte region [0x61400000fe40,0x61400000ffd0)
allocated by thread T0 here:
#0 0x450b3f in operator new[](unsigned long) ../../.././libsanitizer/asan/asan_new_delete.cc:52
#1 0x47892a in heapOutOfBoundRead() /home/gayancp/sanitizerstestsuite/main.cpp:40
#2 0x479db2 in main /home/gayancp/sanitizerstestsuite/main.cpp:319
#3 0x7f7cc427fc35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/gayancp/sanitizerstestsuite/main.cpp:42 heapOutOfBoundRead()
Shadow bytes around the buggy address:
0x0c287fff9fa0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fff9fb0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fff9fc0: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
0x0c287fff9fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c287fff9fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c287fff9ff0: 00 00 00 00 00 00 00 00 00 00[fa]fa fa fa fa fa
0x0c287fffa000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fffa010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fffa020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fffa030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fffa040: 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
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Contiguous container OOB:fc
ASan internal: fe
==26462==ABORTING
=================================================================================================================================
=================================================================================================================================
== Starting Test 4
=================================================================================================================================
=================================================================
==26463==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61400000ffd0 at pc 0x478a1d bp 0x7fff8a22f520 sp 0x7fff8a22f518
WRITE of size 4 at 0x61400000ffd0 thread T0
#0 0x478a1c in heapOutOfBoundWrite() /home/gayancp/sanitizerstestsuite/main.cpp:53
#1 0x479dbc in main /home/gayancp/sanitizerstestsuite/main.cpp:320
#2 0x7f2763e82c35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
#3 0x415330 (/x01/exd10/bin_release/MCTester_ASAN+0x415330)
0x61400000ffd0 is located 0 bytes to the right of 400-byte region [0x61400000fe40,0x61400000ffd0)
allocated by thread T0 here:
#0 0x450b3f in operator new[](unsigned long) ../../.././libsanitizer/asan/asan_new_delete.cc:52
#1 0x4789b6 in heapOutOfBoundWrite() /home/gayancp/sanitizerstestsuite/main.cpp:50
#2 0x479dbc in main /home/gayancp/sanitizerstestsuite/main.cpp:320
#3 0x7f2763e82c35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/gayancp/sanitizerstestsuite/main.cpp:53 heapOutOfBoundWrite()
Shadow bytes around the buggy address:
0x0c287fff9fa0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fff9fb0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fff9fc0: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
0x0c287fff9fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c287fff9fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c287fff9ff0: 00 00 00 00 00 00 00 00 00 00[fa]fa fa fa fa fa
0x0c287fffa000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fffa010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fffa020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fffa030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c287fffa040: 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
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Contiguous container OOB:fc
ASan internal: fe
==26463==ABORTING
=================================================================================================================================
=================================================================================================================================
== Starting Test 5
=================================================================================================================================
=================================================================
==26464==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffd2bd0344 at pc 0x478b05 bp 0x7fffd2bd02b0 sp 0x7fffd2bd02a8
READ of size 1 at 0x7fffd2bd0344 thread T0
#0 0x478b04 in stackOutOfBoundRead() /home/gayancp/sanitizerstestsuite/main.cpp:63
#1 0x479dc6 in main /home/gayancp/sanitizerstestsuite/main.cpp:321
#2 0x7fd734f2ac35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
#3 0x415330 (/x01/exd10/bin_release/MCTester_ASAN+0x415330)
Address 0x7fffd2bd0344 is located in stack of thread T0 at offset 132 in frame
#0 0x478a57 in stackOutOfBoundRead() /home/gayancp/sanitizerstestsuite/main.cpp:59
This frame has 1 object(s):
[32, 132) 'stack_array' <== Memory access at offset 132 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
(longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow /home/gayancp/sanitizerstestsuite/main.cpp:63 stackOutOfBoundRead()
Shadow bytes around the buggy address:
0x10007a572010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10007a572020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10007a572030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10007a572040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10007a572050: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00
=>0x10007a572060: 00 00 00 00 00 00 00 00[04]f4 f4 f4 f3 f3 f3 f3
0x10007a572070: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f4 f4
0x10007a572080: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
0x10007a572090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10007a5720a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10007a5720b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
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
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Contiguous container OOB:fc
ASan internal: fe
==26464==ABORTING
=================================================================================================================================
=================================================================================================================================
== Starting Test 6
=================================================================================================================================
=================================================================
==26465==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffaf2dd514 at pc 0x478d89 bp 0x7fffaf2dd480 sp 0x7fffaf2dd478
WRITE of size 1 at 0x7fffaf2dd514 thread T0
#0 0x478d88 in stackOutOfBoundWrite() /home/gayancp/sanitizerstestsuite/main.cpp:87
#1 0x479dd0 in main /home/gayancp/sanitizerstestsuite/main.cpp:322
#2 0x7fadb8d17c35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
#3 0x415330 (/x01/exd10/bin_release/MCTester_ASAN+0x415330)
Address 0x7fffaf2dd514 is located in stack of thread T0 at offset 132 in frame
#0 0x478ce3 in stackOutOfBoundWrite() /home/gayancp/sanitizerstestsuite/main.cpp:83
This frame has 1 object(s):
[32, 132) 'stack_array' <== Memory access at offset 132 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
(longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow /home/gayancp/sanitizerstestsuite/main.cpp:87 stackOutOfBoundWrite()
Shadow bytes around the buggy address:
0x100075e53a50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100075e53a60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100075e53a70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100075e53a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100075e53a90: 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00 00 00
=>0x100075e53aa0: 00 00[04]f4 f4 f4 f3 f3 f3 f3 00 00 00 00 00 00
0x100075e53ab0: 00 00 f1 f1 f1 f1 00 00 f4 f4 f3 f3 f3 f3 00 00
0x100075e53ac0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100075e53ad0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100075e53ae0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100075e53af0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
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
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Contiguous container OOB:fc
ASan internal: fe
==26465==ABORTING
=================================================================================================================================
=================================================================================================================================
== Starting Test 7
=================================================================================================================================
=================================================================
==26466==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000000719e50 at pc 0x478f93 bp 0x7fff3fe790c0 sp 0x7fff3fe790b8
READ of size 4 at 0x000000719e50 thread T0
#0 0x478f92 in globalOutOfBoundRead() /home/gayancp/sanitizerstestsuite/main.cpp:111
#1 0x479dda in main /home/gayancp/sanitizerstestsuite/main.cpp:323
#2 0x7f7d30c26c35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
#3 0x415330 (/x01/exd10/bin_release/MCTester_ASAN+0x415330)
0x000000719e50 is located 0 bytes to the right of global variable 'global_array' from 'main.cpp' (0x719cc0) of size 400
SUMMARY: AddressSanitizer: global-buffer-overflow /home/gayancp/sanitizerstestsuite/main.cpp:111 globalOutOfBoundRead()
Shadow bytes around the buggy address:
0x0000800db370: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0000800db380: 00 00 00 00 00 00 00 00 00 00 00 00 00 f9 f9 f9
0x0000800db390: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
0x0000800db3a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0000800db3b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0000800db3c0: 00 00 00 00 00 00 00 00 00 00[f9]f9 f9 f9 f9 f9
0x0000800db3d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0000800db3e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0000800db3f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0000800db400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0000800db410: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
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
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Contiguous container OOB:fc
ASan internal: fe
==26466==ABORTING
=================================================================================================================================
=================================================================================================================================
== Starting Test 8
=================================================================================================================================
=================================================================
==26467==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000000719e50 at pc 0x478fd4 bp 0x7fff6f90fb50 sp 0x7fff6f90fb48
WRITE of size 4 at 0x000000719e50 thread T0
#0 0x478fd3 in globalOutOfBoundWrite() /home/gayancp/sanitizerstestsuite/main.cpp:117
#1 0x479de4 in main /home/gayancp/sanitizerstestsuite/main.cpp:324
#2 0x7fc4642aec35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
#3 0x415330 (/x01/exd10/bin_release/MCTester_ASAN+0x415330)
0x000000719e50 is located 0 bytes to the right of global variable 'global_array' from 'main.cpp' (0x719cc0) of size 400
SUMMARY: AddressSanitizer: global-buffer-overflow /home/gayancp/sanitizerstestsuite/main.cpp:117 globalOutOfBoundWrite()
Shadow bytes around the buggy address:
0x0000800db370: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0000800db380: 00 00 00 00 00 00 00 00 00 00 00 00 00 f9 f9 f9
0x0000800db390: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
0x0000800db3a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0000800db3b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0000800db3c0: 00 00 00 00 00 00 00 00 00 00[f9]f9 f9 f9 f9 f9
0x0000800db3d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0000800db3e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0000800db3f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0000800db400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0000800db410: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
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
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Contiguous container OOB:fc
ASan internal: fe
==26467==ABORTING
=================================================================================================================================
=================================================================================================================================
== Starting Test 9
=================================================================================================================================
Executing : 9 : Testing use after return
=================================================================================================================================
=================================================================================================================================
== Starting Test 10
=================================================================================================================================
Executing : 10 : Testing simple memory leak
=================================================================
==26470==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 400 byte(s) in 1 object(s) allocated from:
#0 0x450b3f in operator new[](unsigned long) ../../.././libsanitizer/asan/asan_new_delete.cc:52
#1 0x47911e in memoryLeakSimple() /home/gayancp/sanitizerstestsuite/main.cpp:139
#2 0x479df8 in main /home/gayancp/sanitizerstestsuite/main.cpp:326
#3 0x7f556d0ccc35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
SUMMARY: AddressSanitizer: 400 byte(s) leaked in 1 allocation(s).
=================================================================================================================================
=================================================================================================================================
== Starting Test 11
=================================================================================================================================
Executing : 11 : Testing indirect memory leak
=================================================================
==26472==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 8 byte(s) in 1 object(s) allocated from:
#0 0x450a1f in operator new(unsigned long) ../../.././libsanitizer/asan/asan_new_delete.cc:50
#1 0x47917c in memoryLeakIndirectly() /home/gayancp/sanitizerstestsuite/main.cpp:154
#2 0x479e02 in main /home/gayancp/sanitizerstestsuite/main.cpp:327
#3 0x7ffd70f99c35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
Indirect leak of 40 byte(s) in 1 object(s) allocated from:
#0 0x450b3f in operator new[](unsigned long) ../../.././libsanitizer/asan/asan_new_delete.cc:52
#1 0x479189 in memoryLeakIndirectly() /home/gayancp/sanitizerstestsuite/main.cpp:147
#2 0x479e02 in main /home/gayancp/sanitizerstestsuite/main.cpp:327
#3 0x7ffd70f99c35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
SUMMARY: AddressSanitizer: 48 byte(s) leaked in 2 allocation(s).
=================================================================================================================================
=================================================================================================================================
== Starting Test 12
=================================================================================================================================
Executing : 12 : Testing use of uninitialized stack : x is 0
=================================================================================================================================
=================================================================================================================================
== Starting Test 13
=================================================================================================================================
Executing : 13 : Testing use of uninitialized heap array : Char* is [¾¾¾¾¾¾¾¾¾¾]
=================================================================================================================================
=================================================================================================================================
== Starting Test 14
=================================================================================================================================
Executing : 14 : Testing conditional use of uninitialized stack value >>> condition (x < 1) met based on uninitialized value : 0
=================================================================================================================================
=================================================================================================================================
== Starting Test 15
=================================================================================================================================
Executing : 15 : Testing conditional use of uninitialized heap value >>> condition (x < 1) met based on uninitialized value : -1094795586
=================================================================================================================================
=================================================================================================================================
== Starting Test 16
=================================================================================================================================
=================================================================
==26482==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000eff0 at pc 0x47938b bp 0x7fff9f2fb600 sp 0x7fff9f2fb5f8
WRITE of size 26 at 0x60200000eff0 thread T0
#0 0x47938a in charBufferOverflow() /home/gayancp/sanitizerstestsuite/main.cpp:191
#1 0x479e9e in main /home/gayancp/sanitizerstestsuite/main.cpp:346
#2 0x7fa24c5c9c35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
#3 0x415330 (/x01/exd10/bin_release/MCTester_ASAN+0x415330)
0x60200000eff2 is located 0 bytes to the right of 2-byte region [0x60200000eff0,0x60200000eff2)
allocated by thread T0 here:
#0 0x450b3f in operator new[](unsigned long) ../../.././libsanitizer/asan/asan_new_delete.cc:52
#1 0x4792d3 in charBufferOverflow() /home/gayancp/sanitizerstestsuite/main.cpp:190
#2 0x479e9e in main /home/gayancp/sanitizerstestsuite/main.cpp:346
#3 0x7fa24c5c9c35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/gayancp/sanitizerstestsuite/main.cpp:191 charBufferOverflow()
Shadow bytes around the buggy address:
0x0c047fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9db0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9dc0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9dd0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9de0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c047fff9df0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa[02]fa
0x0c047fff9e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9e10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9e20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9e30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9e40: 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
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Contiguous container OOB:fc
ASan internal: fe
==26482==ABORTING
=================================================================================================================================
=================================================================================================================================
== Starting Test 17
=================================================================================================================================
=================================================================
==26483==ERROR: AddressSanitizer: attempting double-free on 0x60400000dfd0 in thread T0:
#0 0x450fa7 in operator delete[](void*) ../../.././libsanitizer/asan/asan_new_delete.cc:83
#1 0x479619 in invalidFree() /home/gayancp/sanitizerstestsuite/main.cpp:208
#2 0x479ea5 in main /home/gayancp/sanitizerstestsuite/main.cpp:347
#3 0x7f6c77307c35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
#4 0x415330 (/x01/exd10/bin_release/MCTester_ASAN+0x415330)
0x60400000dfd0 is located 0 bytes inside of 40-byte region [0x60400000dfd0,0x60400000dff8)
freed by thread T0 here:
#0 0x450fa7 in operator delete[](void*) ../../.././libsanitizer/asan/asan_new_delete.cc:83
#1 0x479611 in invalidFree() /home/gayancp/sanitizerstestsuite/main.cpp:207
#2 0x479ea5 in main /home/gayancp/sanitizerstestsuite/main.cpp:347
#3 0x7f6c77307c35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
previously allocated by thread T0 here:
#0 0x450b3f in operator new[](unsigned long) ../../.././libsanitizer/asan/asan_new_delete.cc:52
#1 0x479601 in invalidFree() /home/gayancp/sanitizerstestsuite/main.cpp:206
#2 0x479ea5 in main /home/gayancp/sanitizerstestsuite/main.cpp:347
#3 0x7f6c77307c35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
SUMMARY: AddressSanitizer: double-free ../../.././libsanitizer/asan/asan_new_delete.cc:83 operator delete[](void*)
==26483==ABORTING
=================================================================================================================================
=================================================================================================================================
== Starting Test 18
=================================================================================================================================
=================================================================
==26484==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new [] vs operator delete) on 0x60400000dfd0
#0 0x450e97 in operator delete(void*) ../../.././libsanitizer/asan/asan_new_delete.cc:81
#1 0x479640 in mismatchedFree() /home/gayancp/sanitizerstestsuite/main.cpp:216
#2 0x479eac in main /home/gayancp/sanitizerstestsuite/main.cpp:348
#3 0x7f9430ebbc35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
#4 0x415330 (/x01/exd10/bin_release/MCTester_ASAN+0x415330)
0x60400000dfd0 is located 0 bytes inside of 40-byte region [0x60400000dfd0,0x60400000dff8)
allocated by thread T0 here:
#0 0x450b3f in operator new[](unsigned long) ../../.././libsanitizer/asan/asan_new_delete.cc:52
#1 0x479638 in mismatchedFree() /home/gayancp/sanitizerstestsuite/main.cpp:214
#2 0x479eac in main /home/gayancp/sanitizerstestsuite/main.cpp:348
#3 0x7f9430ebbc35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
SUMMARY: AddressSanitizer: alloc-dealloc-mismatch ../../.././libsanitizer/asan/asan_new_delete.cc:81 operator delete(void*)
==26484==HINT: if you don't care about these warnings you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
==26484==ABORTING
=================================================================================================================================
=================================================================================================================================
== Starting Test 19
=================================================================================================================================
Executing : 19 : Testing speed : 1.759742 seconds elapsed
=================================================================================================================================
=================================================================================================================================
== Starting Test 20
=================================================================================================================================
=================================================================
==26488==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff4de4a240 at pc 0x479528 bp 0x7fff4de4a210 sp 0x7fff4de4a208
WRITE of size 26 at 0x7fff4de4a240 thread T0
#0 0x479527 in charBufferOverflowStack() /home/gayancp/sanitizerstestsuite/main.cpp:199
#1 0x479eba in main /home/gayancp/sanitizerstestsuite/main.cpp:350
#2 0x7f0885dc6c35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
#3 0x415330 (/x01/exd10/bin_release/MCTester_ASAN+0x415330)
Address 0x7fff4de4a240 is located in stack of thread T0 at offset 32 in frame
#0 0x479403 in charBufferOverflowStack() /home/gayancp/sanitizerstestsuite/main.cpp:196
This frame has 1 object(s):
[32, 34) 'zBuf' <== Memory access at offset 32 partially overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
(longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow /home/gayancp/sanitizerstestsuite/main.cpp:199 charBufferOverflowStack()
Shadow bytes around the buggy address:
0x100069bc13f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100069bc1400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100069bc1410: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100069bc1420: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100069bc1430: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x100069bc1440: 00 00 00 00 f1 f1 f1 f1[02]f4 f4 f4 f3 f3 f3 f3
0x100069bc1450: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f4 f4
0x100069bc1460: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
0x100069bc1470: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100069bc1480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100069bc1490: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
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
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Contiguous container OOB:fc
ASan internal: fe
==26488==ABORTING
=================================================================================================================================
=================================================================================================================================
== Starting Test 21
=================================================================================================================================
ASAN:SIGSEGV
=================================================================
==26489==ERROR: AddressSanitizer: SEGV on unknown address 0x6140000718c0 (pc 0x0000004798d8 sp 0x7fff07b90080 bp 0x7fff07b90090 T0)
#0 0x4798d7 in heapOutOfBoundReadLarge() /home/gayancp/sanitizerstestsuite/main.cpp:256
#1 0x479ec1 in main /home/gayancp/sanitizerstestsuite/main.cpp:351
#2 0x7fc47ac21c35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
#3 0x415330 (/x01/exd10/bin_release/MCTester_ASAN+0x415330)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/gayancp/sanitizerstestsuite/main.cpp:256 heapOutOfBoundReadLarge()
==26489==ABORTING
=================================================================================================================================
=================================================================================================================================
== Starting Test 22
=================================================================================================================================
ASAN:SIGSEGV
=================================================================
==26490==ERROR: AddressSanitizer: SEGV on unknown address 0x6140000718c0 (pc 0x000000479972 sp 0x7ffff4d17a90 bp 0x7ffff4d17aa0 T0)
#0 0x479971 in heapOutOfBoundWriteLarge() /home/gayancp/sanitizerstestsuite/main.cpp:267
#1 0x479ec8 in main /home/gayancp/sanitizerstestsuite/main.cpp:352
#2 0x7fe6a8ae8c35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
#3 0x415330 (/x01/exd10/bin_release/MCTester_ASAN+0x415330)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/gayancp/sanitizerstestsuite/main.cpp:267 heapOutOfBoundWriteLarge()
==26490==ABORTING
=================================================================================================================================
=================================================================================================================================
== Starting Test 23
=================================================================================================================================
ASAN:SIGSEGV
=================================================================
==26491==ERROR: AddressSanitizer: SEGV on unknown address 0x7fff6b302900 (pc 0x000000478c3c sp 0x7fff6b2ea240 bp 0x7fff6b2ea320 T0)
#0 0x478c3b in stackOutOfBoundReadLarge() /home/gayancp/sanitizerstestsuite/main.cpp:71
#1 0x479ecf in main /home/gayancp/sanitizerstestsuite/main.cpp:353
#2 0x7fdf3ee51c35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
#3 0x415330 (/x01/exd10/bin_release/MCTester_ASAN+0x415330)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/gayancp/sanitizerstestsuite/main.cpp:71 stackOutOfBoundReadLarge()
==26491==ABORTING
=================================================================================================================================
=================================================================================================================================
== Starting Test 24
=================================================================================================================================
ASAN:SIGSEGV
=================================================================
==26492==ERROR: AddressSanitizer: SEGV on unknown address 0x7fff502c8390 (pc 0x000000478eb6 sp 0x7fff502afcd0 bp 0x7fff502afdb0 T0)
#0 0x478eb5 in stackOutOfBoundWriteLarge() /home/gayancp/sanitizerstestsuite/main.cpp:95
#1 0x479ed6 in main /home/gayancp/sanitizerstestsuite/main.cpp:354
#2 0x7f6d46a66c35 in __libc_start_main (/lib64/libc.so.6+0x1ec35)
#3 0x415330 (/x01/exd10/bin_release/MCTester_ASAN+0x415330)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/gayancp/sanitizerstestsuite/main.cpp:95 stackOutOfBoundWriteLarge()
==26492==ABORTING
=================================================================================================================================
=================================================================================================================================
== Starting Test 25
=================================================================================================================================
Executing : 25 : Testing stack out of bound read integer100 0
=================================================================================================================================
=================================================================================================================================
== Starting Test 26
=================================================================================================================================
Executing : 26 : Testing stack out of bound write integeri : 33 0
=================================================================================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment