==127104== Memcheck, a memory error detector ==127104== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==127104== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info ==127104== Command: ./invalid_read.invalid_write.0_bytes_after ==127104== ==127104== Invalid write of size 1 ==127104== at 0x40066B: repeat_char (invalid_read.invalid_write.0_bytes_after.c:6) ==127104== by 0x4006E5: main (invalid_read.invalid_write.0_bytes_after.c:17) ==127104== Address 0x5205043 is 0 bytes after a block of size 3 alloc'd ==127104== at 0x4C29F73: malloc (vg_replace_malloc.c:309) ==127104== by 0x400631: repeat_char (invalid_read.invalid_write.0_bytes_after.c:2) ==127104== by 0x4006E5: main (invalid_read.invalid_write.0_bytes_after.c:17) ==127104== ==127104== Invalid read of size 1 ==127104== at 0x4006BE: print_string (invalid_read.invalid_write.0_bytes_after.c:11) ==127104== by 0x4006F5: main (invalid_read.invalid_write.0_bytes_after.c:18) ==127104== Address 0x5205043 is 0 bytes after a block of size 3 alloc'd ==127104== at 0x4C29F73: malloc (vg_replace_malloc.c:309) ==127104== by 0x400631: repeat_char (invalid_read.invalid_write.0_bytes_after.c:2) ==127104== by 0x4006E5: main (invalid_read.invalid_write.0_bytes_after.c:17) ==127104== @@@==127104== ==127104== HEAP SUMMARY: ==127104== in use at exit: 0 bytes in 0 blocks ==127104== total heap usage: 1 allocs, 1 frees, 3 bytes allocated ==127104== ==127104== All heap blocks were freed -- no leaks are possible ==127104== ==127104== For lists of detected and suppressed errors, rerun with: -s ==127104== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)