==9572== Memcheck, a memory error detector ==9572== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==9572== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info ==9572== Command: ./tcc /home/prakti/Downloads/use_section1-oob_write.c ==9572== ==9572== Invalid write of size 8 ==9572== at 0x422A4B: use_section1 (tccasm.c:427) ==9572== by 0x422A4B: push_section (tccasm.c:443) ==9572== by 0x422A4B: asm_parse_directive (tccasm.c:854) ==9572== by 0x422EBA: tcc_assemble_internal (tccasm.c:927) ==9572== by 0x422F81: tcc_assemble_inline (tccasm.c:995) ==9572== by 0x42320F: asm_instr (tccasm.c:1226) ==9572== by 0x415ED4: block (tccgen.c:6193) ==9572== by 0x415C84: block (tccgen.c:5974) ==9572== by 0x417BB5: unary (tccgen.c:4729) ==9572== by 0x417CBA: expr_prod (tccgen.c:5290) ==9572== by 0x417D05: expr_sum (tccgen.c:5303) ==9572== by 0x417D45: expr_shift (tccgen.c:5316) ==9572== by 0x417D85: expr_cmp (tccgen.c:5329) ==9572== by 0x417DD5: expr_cmpeq (tccgen.c:5343) ==9572== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==9572== ==9572== ==9572== Process terminating with default action of signal 11 (SIGSEGV) ==9572== Access not within mapped region at address 0x0 ==9572== at 0x422A4B: use_section1 (tccasm.c:427) ==9572== by 0x422A4B: push_section (tccasm.c:443) ==9572== by 0x422A4B: asm_parse_directive (tccasm.c:854) ==9572== by 0x422EBA: tcc_assemble_internal (tccasm.c:927) ==9572== by 0x422F81: tcc_assemble_inline (tccasm.c:995) ==9572== by 0x42320F: asm_instr (tccasm.c:1226) ==9572== by 0x415ED4: block (tccgen.c:6193) ==9572== by 0x415C84: block (tccgen.c:5974) ==9572== by 0x417BB5: unary (tccgen.c:4729) ==9572== by 0x417CBA: expr_prod (tccgen.c:5290) ==9572== by 0x417D05: expr_sum (tccgen.c:5303) ==9572== by 0x417D45: expr_shift (tccgen.c:5316) ==9572== by 0x417D85: expr_cmp (tccgen.c:5329) ==9572== by 0x417DD5: expr_cmpeq (tccgen.c:5343) ==9572== If you believe this happened as a result of a stack ==9572== overflow in your program's main thread (unlikely but ==9572== possible), you can try to increase the size of the ==9572== main thread stack using the --main-stacksize= flag. ==9572== The main thread stack size used in this run was 8388608. ==9572== ==9572== HEAP SUMMARY: ==9572== in use at exit: 1,869,814 bytes in 72 blocks ==9572== total heap usage: 134 allocs, 62 frees, 1,918,875 bytes allocated ==9572== ==9572== LEAK SUMMARY: ==9572== definitely lost: 0 bytes in 0 blocks ==9572== indirectly lost: 0 bytes in 0 blocks ==9572== possibly lost: 0 bytes in 0 blocks ==9572== still reachable: 1,869,814 bytes in 72 blocks ==9572== suppressed: 0 bytes in 0 blocks ==9572== Rerun with --leak-check=full to see details of leaked memory ==9572== ==9572== For counts of detected and suppressed errors, rerun with: -v ==9572== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)