Skip to content

Instantly share code, notes, and snippets.

@gayanpathirage
Created April 7, 2016 09:06
Show Gist options
  • Save gayanpathirage/3731b6493a7b74daa6d5fc59289cc35a to your computer and use it in GitHub Desktop.
Save gayanpathirage/3731b6493a7b74daa6d5fc59289cc35a to your computer and use it in GitHub Desktop.
C++ Sanitizers Review Test Suite Results
=================================================================================================================================
== Starting Test 1
=================================================================================================================================
==26362== Memcheck, a memory error detector
==26362== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26362== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26362== Command: MCTester 1 1
==26362==
==26362== Invalid read of size 4
==26362== at 0x400D8D: useAfterFreeRead() (main.cpp:26)
==26362== by 0x401603: main (main.cpp:339)
==26362== Address 0x5b650a0 is 0 bytes inside a block of size 400 free'd
==26362== at 0x4C278FE: operator delete[](void*) (vg_replace_malloc.c:620)
==26362== by 0x400D8C: useAfterFreeRead() (main.cpp:25)
==26362== by 0x401603: main (main.cpp:339)
==26362== Block was alloc'd at
==26362== at 0x4C28F7C: operator new[](unsigned long) (vg_replace_malloc.c:422)
==26362== by 0x400D76: useAfterFreeRead() (main.cpp:23)
==26362== by 0x401603: main (main.cpp:339)
==26362==
Executing : 1 : Testing Use after free UAF read
==26362==
==26362== HEAP SUMMARY:
==26362== in use at exit: 0 bytes in 0 blocks
==26362== total heap usage: 2 allocs, 2 frees, 424 bytes allocated
==26362==
==26362== All heap blocks were freed -- no leaks are possible
==26362==
==26362== For counts of detected and suppressed errors, rerun with: -v
==26362== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 2
=================================================================================================================================
==26365== Memcheck, a memory error detector
==26365== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26365== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26365== Command: MCTester 2 2
==26365==
==26365== Invalid write of size 4
==26365== at 0x400DBC: useAfterFreeWrite() (main.cpp:35)
==26365== by 0x40160D: main (main.cpp:340)
==26365== Address 0x5b650a0 is 0 bytes inside a block of size 400 free'd
==26365== at 0x4C278FE: operator delete[](void*) (vg_replace_malloc.c:620)
==26365== by 0x400DBB: useAfterFreeWrite() (main.cpp:34)
==26365== by 0x40160D: main (main.cpp:340)
==26365== Block was alloc'd at
==26365== at 0x4C28F7C: operator new[](unsigned long) (vg_replace_malloc.c:422)
==26365== by 0x400DA5: useAfterFreeWrite() (main.cpp:32)
==26365== by 0x40160D: main (main.cpp:340)
==26365==
Executing : 2 : Testing Use after free UAF write
==26365==
==26365== HEAP SUMMARY:
==26365== in use at exit: 0 bytes in 0 blocks
==26365== total heap usage: 2 allocs, 2 frees, 424 bytes allocated
==26365==
==26365== All heap blocks were freed -- no leaks are possible
==26365==
==26365== For counts of detected and suppressed errors, rerun with: -v
==26365== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 3
=================================================================================================================================
==26369== Memcheck, a memory error detector
==26369== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26369== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26369== Command: MCTester 3 3
==26369==
==26369== Invalid read of size 4
==26369== at 0x400DDF: heapOutOfBoundRead() (main.cpp:43)
==26369== by 0x401617: main (main.cpp:341)
==26369== Address 0x5b65230 is 0 bytes after a block of size 400 alloc'd
==26369== at 0x4C28F7C: operator new[](unsigned long) (vg_replace_malloc.c:422)
==26369== by 0x400DD8: heapOutOfBoundRead() (main.cpp:41)
==26369== by 0x401617: main (main.cpp:341)
==26369==
Executing : 3 : Testing heap out of bound read
==26369==
==26369== HEAP SUMMARY:
==26369== in use at exit: 0 bytes in 0 blocks
==26369== total heap usage: 2 allocs, 2 frees, 424 bytes allocated
==26369==
==26369== All heap blocks were freed -- no leaks are possible
==26369==
==26369== For counts of detected and suppressed errors, rerun with: -v
==26369== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 4
=================================================================================================================================
==26372== Memcheck, a memory error detector
==26372== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26372== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26372== Command: MCTester 4 4
==26372==
==26372== Invalid write of size 4
==26372== at 0x400E26: heapOutOfBoundWrite() (main.cpp:54)
==26372== by 0x401621: main (main.cpp:342)
==26372== Address 0x5b65230 is 0 bytes after a block of size 400 alloc'd
==26372== at 0x4C28F7C: operator new[](unsigned long) (vg_replace_malloc.c:422)
==26372== by 0x400E0F: heapOutOfBoundWrite() (main.cpp:51)
==26372== by 0x401621: main (main.cpp:342)
==26372==
Executing : 4 : Testing heap out of bound write
==26372==
==26372== HEAP SUMMARY:
==26372== in use at exit: 0 bytes in 0 blocks
==26372== total heap usage: 3 allocs, 3 frees, 1,224 bytes allocated
==26372==
==26372== All heap blocks were freed -- no leaks are possible
==26372==
==26372== For counts of detected and suppressed errors, rerun with: -v
==26372== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 5
=================================================================================================================================
==26376== Memcheck, a memory error detector
==26376== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26376== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26376== Command: MCTester 5 5
==26376==
==26376== Syscall param write(buf) points to uninitialised byte(s)
==26376== at 0x58BA300: __write_nocancel (in /lib64/libc-2.11.3.so)
==26376== by 0x5860432: _IO_file_write@@GLIBC_2.2.5 (in /lib64/libc-2.11.3.so)
==26376== by 0x5860099: new_do_write (in /lib64/libc-2.11.3.so)
==26376== by 0x58603D4: _IO_do_write@@GLIBC_2.2.5 (in /lib64/libc-2.11.3.so)
==26376== by 0x5860C47: _IO_file_sync@@GLIBC_2.2.5 (in /lib64/libc-2.11.3.so)
==26376== by 0x58547C5: fflush (in /lib64/libc-2.11.3.so)
==26376== by 0x4ECD93D: pubsync (streambuf:271)
==26376== by 0x4ECD93D: std::ostream::flush() (ostream.tcc:219)
==26376== by 0x4EA61DB: std::ios_base::Init::~Init() (ios_init.cc:134)
==26376== by 0x58237F4: __run_exit_handlers (in /lib64/libc-2.11.3.so)
==26376== by 0x5823844: exit (in /lib64/libc-2.11.3.so)
==26376== by 0x580CC3C: (below main) (in /lib64/libc-2.11.3.so)
==26376== Address 0x4021033 is in a rw- anonymous segment
==26376==
Executing : 5 : Testing stack out of bound read100 -
==26376==
==26376== HEAP SUMMARY:
==26376== in use at exit: 0 bytes in 0 blocks
==26376== total heap usage: 1 allocs, 1 frees, 24 bytes allocated
==26376==
==26376== All heap blocks were freed -- no leaks are possible
==26376==
==26376== For counts of detected and suppressed errors, rerun with: -v
==26376== Use --track-origins=yes to see where uninitialised values come from
==26376== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 6
=================================================================================================================================
==26379== Memcheck, a memory error detector
==26379== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26379== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26379== Command: MCTester 6 6
==26379==
==26379== Conditional jump or move depends on uninitialised value(s)
==26379== at 0x4C29F69: __GI_strlen (vg_replace_strmem.c:455)
==26379== by 0x583722C: vfprintf (in /lib64/libc-2.11.3.so)
==26379== by 0x583CF89: printf (in /lib64/libc-2.11.3.so)
==26379== by 0x400F14: stackOutOfBoundWrite() (main.cpp:89)
==26379== by 0x401635: main (main.cpp:344)
==26379==
==26379== Conditional jump or move depends on uninitialised value(s)
==26379== at 0x4C29F78: __GI_strlen (vg_replace_strmem.c:455)
==26379== by 0x583722C: vfprintf (in /lib64/libc-2.11.3.so)
==26379== by 0x583CF89: printf (in /lib64/libc-2.11.3.so)
==26379== by 0x400F14: stackOutOfBoundWrite() (main.cpp:89)
==26379== by 0x401635: main (main.cpp:344)
==26379==
==26379== Syscall param write(buf) points to uninitialised byte(s)
==26379== at 0x58BA300: __write_nocancel (in /lib64/libc-2.11.3.so)
==26379== by 0x5860432: _IO_file_write@@GLIBC_2.2.5 (in /lib64/libc-2.11.3.so)
==26379== by 0x5860099: new_do_write (in /lib64/libc-2.11.3.so)
==26379== by 0x58603D4: _IO_do_write@@GLIBC_2.2.5 (in /lib64/libc-2.11.3.so)
==26379== by 0x5860C47: _IO_file_sync@@GLIBC_2.2.5 (in /lib64/libc-2.11.3.so)
==26379== by 0x58547C5: fflush (in /lib64/libc-2.11.3.so)
==26379== by 0x4ECD93D: pubsync (streambuf:271)
==26379== by 0x4ECD93D: std::ostream::flush() (ostream.tcc:219)
==26379== by 0x4EA61DB: std::ios_base::Init::~Init() (ios_init.cc:134)
==26379== by 0x58237F4: __run_exit_handlers (in /lib64/libc-2.11.3.so)
==26379== by 0x5823844: exit (in /lib64/libc-2.11.3.so)
==26379== by 0x580CC3C: (below main) (in /lib64/libc-2.11.3.so)
==26379== Address 0x4021039 is in a rw- anonymous segment
==26379==
Executing : 6 : Testing stack out of bound write i : 33 ¸R
==26379==
==26379== HEAP SUMMARY:
==26379== in use at exit: 0 bytes in 0 blocks
==26379== total heap usage: 1 allocs, 1 frees, 24 bytes allocated
==26379==
==26379== All heap blocks were freed -- no leaks are possible
==26379==
==26379== For counts of detected and suppressed errors, rerun with: -v
==26379== Use --track-origins=yes to see where uninitialised values come from
==26379== ERROR SUMMARY: 6 errors from 3 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 7
=================================================================================================================================
==26382== Memcheck, a memory error detector
==26382== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26382== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26382== Command: MCTester 7 7
==26382==
Executing : 7 : Testing global out of bound read
==26382==
==26382== HEAP SUMMARY:
==26382== in use at exit: 0 bytes in 0 blocks
==26382== total heap usage: 1 allocs, 1 frees, 24 bytes allocated
==26382==
==26382== All heap blocks were freed -- no leaks are possible
==26382==
==26382== For counts of detected and suppressed errors, rerun with: -v
==26382== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 8
=================================================================================================================================
==26385== Memcheck, a memory error detector
==26385== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26385== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26385== Command: MCTester 8 8
==26385==
Executing : 8 : Testing global out of bound write
==26385==
==26385== HEAP SUMMARY:
==26385== in use at exit: 0 bytes in 0 blocks
==26385== total heap usage: 1 allocs, 1 frees, 24 bytes allocated
==26385==
==26385== All heap blocks were freed -- no leaks are possible
==26385==
==26385== For counts of detected and suppressed errors, rerun with: -v
==26385== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 9
=================================================================================================================================
==26389== Memcheck, a memory error detector
==26389== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26389== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26389== Command: MCTester 9 9
==26389==
==26389== Invalid read of size 4
==26389== at 0x400FE8: useAfterReturn() (main.cpp:134)
==26389== by 0x401653: main (main.cpp:347)
==26389== Address 0xffefff4e8 is on thread 1's stack
==26389== 408 bytes below stack pointer
==26389==
Executing : 9 : Testing use after return
==26389==
==26389== HEAP SUMMARY:
==26389== in use at exit: 0 bytes in 0 blocks
==26389== total heap usage: 1 allocs, 1 frees, 24 bytes allocated
==26389==
==26389== All heap blocks were freed -- no leaks are possible
==26389==
==26389== For counts of detected and suppressed errors, rerun with: -v
==26389== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 10
=================================================================================================================================
==26394== Memcheck, a memory error detector
==26394== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26394== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26394== Command: MCTester 10 10
==26394==
Executing : 10 : Testing simple memory leak
==26394==
==26394== HEAP SUMMARY:
==26394== in use at exit: 400 bytes in 1 blocks
==26394== total heap usage: 2 allocs, 1 frees, 424 bytes allocated
==26394==
==26394== LEAK SUMMARY:
==26394== definitely lost: 400 bytes in 1 blocks
==26394== indirectly lost: 0 bytes in 0 blocks
==26394== possibly lost: 0 bytes in 0 blocks
==26394== still reachable: 0 bytes in 0 blocks
==26394== suppressed: 0 bytes in 0 blocks
==26394== Rerun with --leak-check=full to see details of leaked memory
==26394==
==26394== For counts of detected and suppressed errors, rerun with: -v
==26394== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 11
=================================================================================================================================
==26397== Memcheck, a memory error detector
==26397== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26397== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26397== Command: MCTester 11 11
==26397==
Executing : 11 : Testing indirect memory leak
==26397==
==26397== HEAP SUMMARY:
==26397== in use at exit: 48 bytes in 2 blocks
==26397== total heap usage: 3 allocs, 1 frees, 72 bytes allocated
==26397==
==26397== LEAK SUMMARY:
==26397== definitely lost: 8 bytes in 1 blocks
==26397== indirectly lost: 40 bytes in 1 blocks
==26397== possibly lost: 0 bytes in 0 blocks
==26397== still reachable: 0 bytes in 0 blocks
==26397== suppressed: 0 bytes in 0 blocks
==26397== Rerun with --leak-check=full to see details of leaked memory
==26397==
==26397== For counts of detected and suppressed errors, rerun with: -v
==26397== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 12
=================================================================================================================================
==26400== Memcheck, a memory error detector
==26400== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26400== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26400== Command: MCTester 12 12
==26400==
Executing : 12 : Testing use of uninitialized stack : x is 0
==26400==
==26400== HEAP SUMMARY:
==26400== in use at exit: 0 bytes in 0 blocks
==26400== total heap usage: 1 allocs, 1 frees, 24 bytes allocated
==26400==
==26400== All heap blocks were freed -- no leaks are possible
==26400==
==26400== For counts of detected and suppressed errors, rerun with: -v
==26400== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 13
=================================================================================================================================
==26403== Memcheck, a memory error detector
==26403== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26403== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26403== Command: MCTester 13 13
==26403==
==26403== Conditional jump or move depends on uninitialised value(s)
==26403== at 0x4C29F69: __GI_strlen (vg_replace_strmem.c:455)
==26403== by 0x583722C: vfprintf (in /lib64/libc-2.11.3.so)
==26403== by 0x583CF89: printf (in /lib64/libc-2.11.3.so)
==26403== by 0x4010B1: useOfUninitializedHeap(char*) (main.cpp:167)
==26403== by 0x401690: main (main.cpp:356)
==26403==
Executing : 13 : Testing use of uninitialized heap array : Char* is []
==26403==
==26403== HEAP SUMMARY:
==26403== in use at exit: 0 bytes in 0 blocks
==26403== total heap usage: 2 allocs, 2 frees, 34 bytes allocated
==26403==
==26403== All heap blocks were freed -- no leaks are possible
==26403==
==26403== For counts of detected and suppressed errors, rerun with: -v
==26403== Use --track-origins=yes to see where uninitialised values come from
==26403== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 14
=================================================================================================================================
==26406== Memcheck, a memory error detector
==26406== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26406== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26406== Command: MCTester 14 14
==26406==
Executing : 14 : Testing conditional use of uninitialized stack value >>> condition (x < 1) met based on uninitialized value : 0
==26406==
==26406== HEAP SUMMARY:
==26406== in use at exit: 0 bytes in 0 blocks
==26406== total heap usage: 1 allocs, 1 frees, 24 bytes allocated
==26406==
==26406== All heap blocks were freed -- no leaks are possible
==26406==
==26406== For counts of detected and suppressed errors, rerun with: -v
==26406== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 15
=================================================================================================================================
==26409== Memcheck, a memory error detector
==26409== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26409== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26409== Command: MCTester 15 15
==26409==
==26409== Conditional jump or move depends on uninitialised value(s)
==26409== at 0x401104: conditionalUseOfUninitializedHeap(int) (main.cpp:182)
==26409== by 0x4016C9: main (main.cpp:365)
==26409==
==26409== Use of uninitialised value of size 8
==26409== at 0x5831D93: _itoa_word (in /lib64/libc-2.11.3.so)
==26409== by 0x5834E6D: vfprintf (in /lib64/libc-2.11.3.so)
==26409== by 0x583CF89: printf (in /lib64/libc-2.11.3.so)
==26409== by 0x401116: conditionalUseOfUninitializedHeap(int) (main.cpp:183)
==26409== by 0x4016C9: main (main.cpp:365)
==26409==
==26409== Conditional jump or move depends on uninitialised value(s)
==26409== at 0x5831D9D: _itoa_word (in /lib64/libc-2.11.3.so)
==26409== by 0x5834E6D: vfprintf (in /lib64/libc-2.11.3.so)
==26409== by 0x583CF89: printf (in /lib64/libc-2.11.3.so)
==26409== by 0x401116: conditionalUseOfUninitializedHeap(int) (main.cpp:183)
==26409== by 0x4016C9: main (main.cpp:365)
==26409==
==26409== Conditional jump or move depends on uninitialised value(s)
==26409== at 0x5834EF8: vfprintf (in /lib64/libc-2.11.3.so)
==26409== by 0x583CF89: printf (in /lib64/libc-2.11.3.so)
==26409== by 0x401116: conditionalUseOfUninitializedHeap(int) (main.cpp:183)
==26409== by 0x4016C9: main (main.cpp:365)
==26409==
==26409== Conditional jump or move depends on uninitialised value(s)
==26409== at 0x5835317: vfprintf (in /lib64/libc-2.11.3.so)
==26409== by 0x583CF89: printf (in /lib64/libc-2.11.3.so)
==26409== by 0x401116: conditionalUseOfUninitializedHeap(int) (main.cpp:183)
==26409== by 0x4016C9: main (main.cpp:365)
==26409==
==26409== Conditional jump or move depends on uninitialised value(s)
==26409== at 0x583458F: vfprintf (in /lib64/libc-2.11.3.so)
==26409== by 0x583CF89: printf (in /lib64/libc-2.11.3.so)
==26409== by 0x401116: conditionalUseOfUninitializedHeap(int) (main.cpp:183)
==26409== by 0x4016C9: main (main.cpp:365)
==26409==
Executing : 15 : Testing conditional use of uninitialized heap value >>> condition (x < 1) met based on uninitialized value : 0
==26409==
==26409== HEAP SUMMARY:
==26409== in use at exit: 0 bytes in 0 blocks
==26409== total heap usage: 2 allocs, 2 frees, 64 bytes allocated
==26409==
==26409== All heap blocks were freed -- no leaks are possible
==26409==
==26409== For counts of detected and suppressed errors, rerun with: -v
==26409== Use --track-origins=yes to see where uninitialised values come from
==26409== ERROR SUMMARY: 6 errors from 6 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 16
=================================================================================================================================
==26413== Memcheck, a memory error detector
==26413== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26413== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26413== Command: MCTester 16 16
==26413==
==26413== Invalid write of size 8
==26413== at 0x401153: charBufferOverflow() (main.cpp:192)
==26413== by 0x4016DD: main (main.cpp:368)
==26413== Address 0x5b650a0 is 0 bytes inside a block of size 2 alloc'd
==26413== at 0x4C28F7C: operator new[](unsigned long) (vg_replace_malloc.c:422)
==26413== by 0x401148: charBufferOverflow() (main.cpp:191)
==26413== by 0x4016DD: main (main.cpp:368)
==26413==
==26413== Invalid write of size 8
==26413== at 0x401160: charBufferOverflow() (main.cpp:192)
==26413== by 0x4016DD: main (main.cpp:368)
==26413== Address 0x5b650a8 is 6 bytes after a block of size 2 alloc'd
==26413== at 0x4C28F7C: operator new[](unsigned long) (vg_replace_malloc.c:422)
==26413== by 0x401148: charBufferOverflow() (main.cpp:191)
==26413== by 0x4016DD: main (main.cpp:368)
==26413==
==26413== Invalid write of size 8
==26413== at 0x40116E: charBufferOverflow() (main.cpp:192)
==26413== by 0x4016DD: main (main.cpp:368)
==26413== Address 0x5b650b0 is 14 bytes after a block of size 2 alloc'd
==26413== at 0x4C28F7C: operator new[](unsigned long) (vg_replace_malloc.c:422)
==26413== by 0x401148: charBufferOverflow() (main.cpp:191)
==26413== by 0x4016DD: main (main.cpp:368)
==26413==
==26413== Invalid write of size 2
==26413== at 0x401172: charBufferOverflow() (main.cpp:192)
==26413== by 0x4016DD: main (main.cpp:368)
==26413== Address 0x5b650b8 is 22 bytes after a block of size 2 alloc'd
==26413== at 0x4C28F7C: operator new[](unsigned long) (vg_replace_malloc.c:422)
==26413== by 0x401148: charBufferOverflow() (main.cpp:191)
==26413== by 0x4016DD: main (main.cpp:368)
==26413==
Executing : 16 : Testing buffer overflow char pointer overlfow i
==26413==
==26413== HEAP SUMMARY:
==26413== in use at exit: 2 bytes in 1 blocks
==26413== total heap usage: 2 allocs, 1 frees, 26 bytes allocated
==26413==
==26413== LEAK SUMMARY:
==26413== definitely lost: 2 bytes in 1 blocks
==26413== indirectly lost: 0 bytes in 0 blocks
==26413== possibly lost: 0 bytes in 0 blocks
==26413== still reachable: 0 bytes in 0 blocks
==26413== suppressed: 0 bytes in 0 blocks
==26413== Rerun with --leak-check=full to see details of leaked memory
==26413==
==26413== For counts of detected and suppressed errors, rerun with: -v
==26413== ERROR SUMMARY: 5 errors from 4 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 17
=================================================================================================================================
==26416== Memcheck, a memory error detector
==26416== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26416== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26416== Command: MCTester 17 17
==26416==
==26416== Invalid free() / delete / delete[] / realloc()
==26416== at 0x4C278FE: operator delete[](void*) (vg_replace_malloc.c:620)
==26416== by 0x40121C: invalidFree() (main.cpp:209)
==26416== by 0x4016E4: main (main.cpp:369)
==26416== Address 0x5b650a0 is 0 bytes inside a block of size 40 free'd
==26416== at 0x4C278FE: operator delete[](void*) (vg_replace_malloc.c:620)
==26416== by 0x401214: invalidFree() (main.cpp:208)
==26416== by 0x4016E4: main (main.cpp:369)
==26416== Block was alloc'd at
==26416== at 0x4C28F7C: operator new[](unsigned long) (vg_replace_malloc.c:422)
==26416== by 0x401204: invalidFree() (main.cpp:207)
==26416== by 0x4016E4: main (main.cpp:369)
==26416==
Executing : 17 : Testing invalid free
==26416==
==26416== HEAP SUMMARY:
==26416== in use at exit: 0 bytes in 0 blocks
==26416== total heap usage: 2 allocs, 3 frees, 64 bytes allocated
==26416==
==26416== All heap blocks were freed -- no leaks are possible
==26416==
==26416== For counts of detected and suppressed errors, rerun with: -v
==26416== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 18
=================================================================================================================================
==26419== Memcheck, a memory error detector
==26419== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26419== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26419== Command: MCTester 18 18
==26419==
==26419== Mismatched free() / delete / delete []
==26419== at 0x4C27DAE: operator delete(void*) (vg_replace_malloc.c:575)
==26419== by 0x40123E: mismatchedFree() (main.cpp:217)
==26419== by 0x4016EB: main (main.cpp:370)
==26419== Address 0x5b650a0 is 0 bytes inside a block of size 40 alloc'd
==26419== at 0x4C28F7C: operator new[](unsigned long) (vg_replace_malloc.c:422)
==26419== by 0x401236: mismatchedFree() (main.cpp:215)
==26419== by 0x4016EB: main (main.cpp:370)
==26419==
Executing : 18 : Testing mismatched free
==26419==
==26419== HEAP SUMMARY:
==26419== in use at exit: 0 bytes in 0 blocks
==26419== total heap usage: 2 allocs, 2 frees, 64 bytes allocated
==26419==
==26419== All heap blocks were freed -- no leaks are possible
==26419==
==26419== For counts of detected and suppressed errors, rerun with: -v
==26419== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 19
=================================================================================================================================
==26422== Memcheck, a memory error detector
==26422== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26422== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26422== Command: MCTester 19 19
==26422==
Executing : 19 : Testing speed : 3.446108 seconds elapsed
==26422==
==26422== HEAP SUMMARY:
==26422== in use at exit: 0 bytes in 0 blocks
==26422== total heap usage: 1,024,002 allocs, 1,024,002 frees, 1,056,768,024 bytes allocated
==26422==
==26422== All heap blocks were freed -- no leaks are possible
==26422==
==26422== For counts of detected and suppressed errors, rerun with: -v
==26422== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 20
=================================================================================================================================
==26427== Memcheck, a memory error detector
==26427== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26427== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26427== Command: MCTester 20 20
==26427==
vex amd64->IR: unhandled instruction bytes: 0x4B 0x27 0x0 0x0 0x0 0x0 0x0 0x0
vex amd64->IR: REX=1 REX.W=1 REX.R=0 REX.X=1 REX.B=1
vex amd64->IR: VEX=0 VEX.L=0 VEX.nVVVV=0x0 ESC=NONE
vex amd64->IR: PFX.66=0 PFX.F2=0 PFX.F3=0
==26427== Invalid read of size 1
==26427== at 0x400073: ??? (in /x01/exd10/bin_release/MCTester)
==26427== by 0x5B6503F: ???
==26427== by 0x40197F: ??? (elf-init.c:140)
==26427== Address 0x19 is not stack'd, malloc'd or (recently) free'd
==26427==
==26427==
==26427== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==26427== Access not within mapped region at address 0x19
==26427== at 0x400073: ??? (in /x01/exd10/bin_release/MCTester)
==26427== by 0x5B6503F: ???
==26427== by 0x40197F: ??? (elf-init.c:140)
==26427== If you believe this happened as a result of a stack
==26427== overflow in your program's main thread (unlikely but
==26427== possible), you can try to increase the size of the
==26427== main thread stack using the --main-stacksize= flag.
==26427== The main thread stack size used in this run was 1048576.
Executing : 20 : Testing buffer overflow char pointer overlfow i
==26427==
==26427== HEAP SUMMARY:
==26427== in use at exit: 24 bytes in 1 blocks
==26427== total heap usage: 1 allocs, 0 frees, 24 bytes allocated
==26427==
==26427== LEAK SUMMARY:
==26427== definitely lost: 0 bytes in 0 blocks
==26427== indirectly lost: 0 bytes in 0 blocks
==26427== possibly lost: 0 bytes in 0 blocks
==26427== still reachable: 24 bytes in 1 blocks
==26427== suppressed: 0 bytes in 0 blocks
==26427== Rerun with --leak-check=full to see details of leaked memory
==26427==
==26427== For counts of detected and suppressed errors, rerun with: -v
==26427== ERROR SUMMARY: 2 errors from 1 contexts (suppressed: 3 from 3)
/mnt/exds/ValgrindInstallations/SuSE-11-SP3/valgrind-3.11.0/vg-in-place: line 31: 26427 Segmentation fault VALGRIND_LIB="$vgbasedir/.in_place" VALGRIND_LIB_INNER="$vgbasedir/.in_place" "$vgbasedir/coregrind/valgrind" "$@"
=================================================================================================================================
=================================================================================================================================
== Starting Test 21
=================================================================================================================================
==26430== Memcheck, a memory error detector
==26430== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26430== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26430== Command: MCTester 21 21
==26430==
==26430== Invalid read of size 4
==26430== at 0x401357: heapOutOfBoundReadLarge() (main.cpp:257)
==26430== by 0x401700: main (main.cpp:373)
==26430== Address 0x5bc6b20 is 399,536 bytes inside an unallocated block of size 4,193,648 in arena "client"
==26430==
Executing : 21 : Testing heap out of bound read large
==26430==
==26430== HEAP SUMMARY:
==26430== in use at exit: 0 bytes in 0 blocks
==26430== total heap usage: 2 allocs, 2 frees, 424 bytes allocated
==26430==
==26430== All heap blocks were freed -- no leaks are possible
==26430==
==26430== For counts of detected and suppressed errors, rerun with: -v
==26430== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 22
=================================================================================================================================
==26433== Memcheck, a memory error detector
==26433== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26433== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26433== Command: MCTester 22 22
==26433==
Executing : 22 : Testing heap out of bound write large
==26433==
==26433== HEAP SUMMARY:
==26433== in use at exit: 0 bytes in 0 blocks
==26433== total heap usage: 3 allocs, 3 frees, 800,424 bytes allocated
==26433==
==26433== All heap blocks were freed -- no leaks are possible
==26433==
==26433== For counts of detected and suppressed errors, rerun with: -v
==26433== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 23
=================================================================================================================================
==26436== Memcheck, a memory error detector
==26436== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26436== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26436== Command: MCTester 23 23
==26436==
==26436== Invalid read of size 1
==26436== at 0x400E9B: stackOutOfBoundReadLarge() (main.cpp:72)
==26436== by 0x40170E: main (main.cpp:375)
==26436== Address 0xfff017cb0 is not stack'd, malloc'd or (recently) free'd
==26436==
==26436==
==26436== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==26436== Access not within mapped region at address 0xFFF017CB0
==26436== at 0x400E9B: stackOutOfBoundReadLarge() (main.cpp:72)
==26436== by 0x40170E: main (main.cpp:375)
==26436== If you believe this happened as a result of a stack
==26436== overflow in your program's main thread (unlikely but
==26436== possible), you can try to increase the size of the
==26436== main thread stack using the --main-stacksize= flag.
==26436== The main thread stack size used in this run was 1048576.
Executing : 23 : Testing stack out of bound read large==26436==
==26436== HEAP SUMMARY:
==26436== in use at exit: 24 bytes in 1 blocks
==26436== total heap usage: 1 allocs, 0 frees, 24 bytes allocated
==26436==
==26436== LEAK SUMMARY:
==26436== definitely lost: 0 bytes in 0 blocks
==26436== indirectly lost: 0 bytes in 0 blocks
==26436== possibly lost: 0 bytes in 0 blocks
==26436== still reachable: 24 bytes in 1 blocks
==26436== suppressed: 0 bytes in 0 blocks
==26436== Rerun with --leak-check=full to see details of leaked memory
==26436==
==26436== For counts of detected and suppressed errors, rerun with: -v
==26436== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from 3)
/mnt/exds/ValgrindInstallations/SuSE-11-SP3/valgrind-3.11.0/vg-in-place: line 31: 26436 Segmentation fault VALGRIND_LIB="$vgbasedir/.in_place" VALGRIND_LIB_INNER="$vgbasedir/.in_place" "$vgbasedir/coregrind/valgrind" "$@"
=================================================================================================================================
=================================================================================================================================
== Starting Test 24
=================================================================================================================================
==26440== Memcheck, a memory error detector
==26440== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26440== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26440== Command: MCTester 24 24
==26440==
==26440== Invalid write of size 1
==26440== at 0x400F2D: stackOutOfBoundWriteLarge() (main.cpp:96)
==26440== by 0x401715: main (main.cpp:376)
==26440== Address 0xfff017cb0 is not stack'd, malloc'd or (recently) free'd
==26440==
==26440==
==26440== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==26440== Access not within mapped region at address 0xFFF017CB0
==26440== at 0x400F2D: stackOutOfBoundWriteLarge() (main.cpp:96)
==26440== by 0x401715: main (main.cpp:376)
==26440== If you believe this happened as a result of a stack
==26440== overflow in your program's main thread (unlikely but
==26440== possible), you can try to increase the size of the
==26440== main thread stack using the --main-stacksize= flag.
==26440== The main thread stack size used in this run was 1048576.
Executing : 24 : Testing stack out of bound write large==26440==
==26440== HEAP SUMMARY:
==26440== in use at exit: 24 bytes in 1 blocks
==26440== total heap usage: 1 allocs, 0 frees, 24 bytes allocated
==26440==
==26440== LEAK SUMMARY:
==26440== definitely lost: 0 bytes in 0 blocks
==26440== indirectly lost: 0 bytes in 0 blocks
==26440== possibly lost: 0 bytes in 0 blocks
==26440== still reachable: 24 bytes in 1 blocks
==26440== suppressed: 0 bytes in 0 blocks
==26440== Rerun with --leak-check=full to see details of leaked memory
==26440==
==26440== For counts of detected and suppressed errors, rerun with: -v
==26440== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from 3)
/mnt/exds/ValgrindInstallations/SuSE-11-SP3/valgrind-3.11.0/vg-in-place: line 31: 26440 Segmentation fault VALGRIND_LIB="$vgbasedir/.in_place" VALGRIND_LIB_INNER="$vgbasedir/.in_place" "$vgbasedir/coregrind/valgrind" "$@"
=================================================================================================================================
=================================================================================================================================
== Starting Test 25
=================================================================================================================================
==26443== Memcheck, a memory error detector
==26443== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26443== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26443== Command: MCTester 25 25
==26443==
Executing : 25 : Testing stack out of bound read integer100 0
==26443==
==26443== HEAP SUMMARY:
==26443== in use at exit: 0 bytes in 0 blocks
==26443== total heap usage: 1 allocs, 1 frees, 24 bytes allocated
==26443==
==26443== All heap blocks were freed -- no leaks are possible
==26443==
==26443== For counts of detected and suppressed errors, rerun with: -v
==26443== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 3 from 3)
=================================================================================================================================
=================================================================================================================================
== Starting Test 26
=================================================================================================================================
==26446== Memcheck, a memory error detector
==26446== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26446== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==26446== Command: MCTester 26 26
==26446==
Executing : 26 : Testing stack out of bound write integeri : 33 0
==26446==
==26446== HEAP SUMMARY:
==26446== in use at exit: 0 bytes in 0 blocks
==26446== total heap usage: 1 allocs, 1 frees, 24 bytes allocated
==26446==
==26446== All heap blocks were freed -- no leaks are possible
==26446==
==26446== For counts of detected and suppressed errors, rerun with: -v
==26446== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 3 from 3)
=================================================================================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment