==8636== Memcheck, a memory error detector ==8636== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==8636== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info ==8636== Command: ./tcc /home/prakti/Downloads/asm_parse-oob_write.c ==8636== ==8636== Invalid write of size 8 ==8636== at 0x4C3453F: memset (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==8636== by 0x4220E7: memset (string3.h:90) ==8636== by 0x4220E7: asm_parse_directive (tccasm.c:501) ==8636== by 0x422EBA: tcc_assemble_internal (tccasm.c:927) ==8636== by 0x422F81: tcc_assemble_inline (tccasm.c:995) ==8636== by 0x423577: asm_global_instr (tccasm.c:1267) ==8636== by 0x415694: decl0.isra.25 (tccgen.c:7164) ==8636== by 0x41AA34: decl (tccgen.c:7383) ==8636== by 0x41AA34: tccgen_compile (tccgen.c:275) ==8636== by 0x4031B1: tcc_compile (libtcc.c:648) ==8636== by 0x40478D: tcc_add_file_internal (libtcc.c:1064) ==8636== by 0x401B95: main (tcc.c:332) ==8636== Address 0x58e0570 is 0 bytes after a block of size 64 alloc'd ==8636== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==8636== by 0x4C2FDEF: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==8636== by 0x4039C8: tcc_realloc (libtcc.c:224) ==8636== by 0x41B3E3: section_realloc (tccelf.c:267) ==8636== by 0x41B462: section_add (tccelf.c:282) ==8636== by 0x41F7CC: section_ptr_add (tccelf.c:293) ==8636== by 0x41F7CC: tcc_load_object_file (tccelf.c:2432) ==8636== by 0x404874: tcc_add_file_internal (libtcc.c:1028) ==8636== by 0x40494E: tcc_add_library_internal (libtcc.c:1109) ==8636== by 0x404AD0: tcc_add_crt (libtcc.c:1125) ==8636== by 0x404BA8: tcc_set_output_type (libtcc.c:978) ==8636== by 0x401AF1: main (tcc.c:312) ==8636== ==8636== ==8636== Process terminating with default action of signal 11 (SIGSEGV) ==8636== Access not within mapped region at address 0x5B11000 ==8636== at 0x4C3453F: memset (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==8636== by 0x4220E7: memset (string3.h:90) ==8636== by 0x4220E7: asm_parse_directive (tccasm.c:501) ==8636== by 0x422EBA: tcc_assemble_internal (tccasm.c:927) ==8636== by 0x422F81: tcc_assemble_inline (tccasm.c:995) ==8636== by 0x423577: asm_global_instr (tccasm.c:1267) ==8636== by 0x415694: decl0.isra.25 (tccgen.c:7164) ==8636== by 0x41AA34: decl (tccgen.c:7383) ==8636== by 0x41AA34: tccgen_compile (tccgen.c:275) ==8636== by 0x4031B1: tcc_compile (libtcc.c:648) ==8636== by 0x40478D: tcc_add_file_internal (libtcc.c:1064) ==8636== by 0x401B95: main (tcc.c:332) ==8636== If you believe this happened as a result of a stack ==8636== overflow in your program's main thread (unlikely but ==8636== possible), you can try to increase the size of the ==8636== main thread stack using the --main-stacksize= flag. ==8636== The main thread stack size used in this run was 8388608. ==8636== ==8636== HEAP SUMMARY: ==8636== in use at exit: 1,869,677 bytes in 71 blocks ==8636== total heap usage: 133 allocs, 62 frees, 1,918,735 bytes allocated ==8636== ==8636== LEAK SUMMARY: ==8636== definitely lost: 10,701 bytes in 18 blocks ==8636== indirectly lost: 0 bytes in 0 blocks ==8636== possibly lost: 0 bytes in 0 blocks ==8636== still reachable: 1,858,976 bytes in 53 blocks ==8636== suppressed: 0 bytes in 0 blocks ==8636== Rerun with --leak-check=full to see details of leaked memory ==8636== ==8636== For counts of detected and suppressed errors, rerun with: -v ==8636== ERROR SUMMARY: 285363 errors from 1 contexts (suppressed: 0 from 0)