Hi. Michael Matz <[email protected]> wrote: |On Thu, 10 Nov 2016, Steffen Nurpmeso wrote: | |> Hallo. |> |>|The attached diff fixes the issue for me. |> |> One more. | |diff --git a/tccgen.c b/tccgen.c |index fdd8654..00a26c5 100644 |--- a/tccgen.c |+++ b/tccgen.c |@@ -6523,11 +6523,13 @@ static void gen_inline_functions(TCCState *s) | sym->r = VT_SYM | VT_CONST; | sym->type.t &= ~VT_INLINE; | |+ s->inline_fns[i] = NULL; | begin_macro(&fn->func_str, 0); | next(); | cur_text_section = text_section; | gen_function(sym); | end_macro(); |+ s->inline_fns[i] = fn; | | inline_generated = 1; |} |@@ -6544,7 +6546,7 @@ ST_FUNC void free_inline_functions(TCCState *s) | /* free tokens of unused inline functions */ | for (i = 0; i < s->nb_inline_fns; ++i) { | struct InlineFunc *fn = s->inline_fns[i]; |- if (fn->sym) |+ if (fn != NULL && fn->sym != NULL) | tok_str_free(fn->func_str.str); |} | |What is this supposed to achieve? It can only make a difference if |free_inline_function could be called from the code inside the |NULLing/reset sequence, which is not the case.
Yes it is, there is a double free in conjunction with the preprocessor end_macro() (imagine a smile here). end_macro() frees the macro and then that free_inline_functions or so tries to frees it again, which causes a crash. It could be the code jumps in the meanwhile? Wait, i could reproduce those easily... Luckily this is fast, and with cherry-picking the -rpath stuff.. I'll attach the valgrind logs. Ciao! --steffen
==948== Memcheck, a memory error detector ==948== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==948== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info ==948== Command: /home/steffen/code.arena/tinycc.git/tcc -Wl,-rpath=/home/steffen/usr/lib -Wl,-rpath=/home/steffen/usr/opt/tcc-mob/lib -Wl,-rpath=/home/steffen/usr/opt/pcc/lib -Wl,-rpath=/lib -Wl,-rpath=/usr/local/lib -Wl,-rpath=/usr/lib -o s-nail-bmta bmta.o -L/home/steffen/usr/lib -L/home/steffen/usr/opt/tcc-mob/lib -L/home/steffen/usr/opt/pcc/lib -L/lib -L/usr/local/lib -L/usr/lib ==948== ==948== Invalid read of size 1 ==948== at 0x415B14: read16le (tcc.h:1414) ==948== by 0x415B14: read32le (tcc.h:1420) ==948== by 0x415B14: relocate_section (tccelf.c:1124) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa34 is 4 bytes after a block of size 2,048 alloc'd ==948== at 0x4C2AACE: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x4C2CC81: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402747: tcc_realloc (libtcc.c:221) ==948== by 0x414A4E: section_realloc (tccelf.c:174) ==948== by 0x414AA0: section_ptr_add (tccelf.c:189) ==948== by 0x418201: tcc_load_object_file (tccelf.c:3087) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== ==948== Invalid read of size 1 ==948== at 0x415B1E: read16le (tcc.h:1414) ==948== by 0x415B1E: read32le (tcc.h:1420) ==948== by 0x415B1E: relocate_section (tccelf.c:1124) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa33 is 3 bytes after a block of size 2,048 alloc'd ==948== at 0x4C2AACE: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x4C2CC81: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402747: tcc_realloc (libtcc.c:221) ==948== by 0x414A4E: section_realloc (tccelf.c:174) ==948== by 0x414AA0: section_ptr_add (tccelf.c:189) ==948== by 0x418201: tcc_load_object_file (tccelf.c:3087) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== ==948== Invalid read of size 1 ==948== at 0x415B28: read16le (tcc.h:1414) ==948== by 0x415B28: read32le (tcc.h:1420) ==948== by 0x415B28: relocate_section (tccelf.c:1124) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa32 is 2 bytes after a block of size 2,048 alloc'd ==948== at 0x4C2AACE: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x4C2CC81: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402747: tcc_realloc (libtcc.c:221) ==948== by 0x414A4E: section_realloc (tccelf.c:174) ==948== by 0x414AA0: section_ptr_add (tccelf.c:189) ==948== by 0x418201: tcc_load_object_file (tccelf.c:3087) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== ==948== Invalid read of size 1 ==948== at 0x415B34: read16le (tcc.h:1414) ==948== by 0x415B34: read32le (tcc.h:1420) ==948== by 0x415B34: relocate_section (tccelf.c:1124) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa31 is 1 bytes after a block of size 2,048 alloc'd ==948== at 0x4C2AACE: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x4C2CC81: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402747: tcc_realloc (libtcc.c:221) ==948== by 0x414A4E: section_realloc (tccelf.c:174) ==948== by 0x414AA0: section_ptr_add (tccelf.c:189) ==948== by 0x418201: tcc_load_object_file (tccelf.c:3087) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== ==948== Invalid write of size 1 ==948== at 0x415B45: write16le (tcc.h:1417) ==948== by 0x415B45: write32le (tcc.h:1423) ==948== by 0x415B45: relocate_section (tccelf.c:1124) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa31 is 1 bytes after a block of size 2,048 alloc'd ==948== at 0x4C2AACE: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x4C2CC81: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402747: tcc_realloc (libtcc.c:221) ==948== by 0x414A4E: section_realloc (tccelf.c:174) ==948== by 0x414AA0: section_ptr_add (tccelf.c:189) ==948== by 0x418201: tcc_load_object_file (tccelf.c:3087) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== ==948== Invalid write of size 1 ==948== at 0x415B4F: write16le (tcc.h:1417) ==948== by 0x415B4F: write32le (tcc.h:1423) ==948== by 0x415B4F: relocate_section (tccelf.c:1124) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa32 is 2 bytes after a block of size 2,048 alloc'd ==948== at 0x4C2AACE: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x4C2CC81: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402747: tcc_realloc (libtcc.c:221) ==948== by 0x414A4E: section_realloc (tccelf.c:174) ==948== by 0x414AA0: section_ptr_add (tccelf.c:189) ==948== by 0x418201: tcc_load_object_file (tccelf.c:3087) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== ==948== Invalid write of size 1 ==948== at 0x415B56: write16le (tcc.h:1417) ==948== by 0x415B56: write32le (tcc.h:1423) ==948== by 0x415B56: relocate_section (tccelf.c:1124) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa33 is 3 bytes after a block of size 2,048 alloc'd ==948== at 0x4C2AACE: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x4C2CC81: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402747: tcc_realloc (libtcc.c:221) ==948== by 0x414A4E: section_realloc (tccelf.c:174) ==948== by 0x414AA0: section_ptr_add (tccelf.c:189) ==948== by 0x418201: tcc_load_object_file (tccelf.c:3087) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== ==948== Invalid write of size 1 ==948== at 0x415B5F: write16le (tcc.h:1417) ==948== by 0x415B5F: write32le (tcc.h:1423) ==948== by 0x415B5F: relocate_section (tccelf.c:1124) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa34 is 4 bytes after a block of size 2,048 alloc'd ==948== at 0x4C2AACE: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x4C2CC81: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402747: tcc_realloc (libtcc.c:221) ==948== by 0x414A4E: section_realloc (tccelf.c:174) ==948== by 0x414AA0: section_ptr_add (tccelf.c:189) ==948== by 0x418201: tcc_load_object_file (tccelf.c:3087) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== ==948== Invalid read of size 1 ==948== at 0x4159B5: read16le (tcc.h:1414) ==948== by 0x4159B5: read32le (tcc.h:1420) ==948== by 0x4159B5: read64le (tcc.h:1426) ==948== by 0x4159B5: relocate_section (tccelf.c:1112) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa63 is 13 bytes before a block of size 144 alloc'd ==948== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402685: tcc_malloc (libtcc.c:204) ==948== by 0x4026A9: tcc_mallocz (libtcc.c:213) ==948== by 0x414955: new_section (tccelf.c:132) ==948== by 0x4182D4: tcc_load_object_file (tccelf.c:3050) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== by 0x4167D8: elf_output_file (tccelf.c:2715) ==948== by 0x4167D8: tcc_output_file (tccelf.c:2905) ==948== ==948== Invalid read of size 1 ==948== at 0x4159BF: read16le (tcc.h:1414) ==948== by 0x4159BF: read32le (tcc.h:1420) ==948== by 0x4159BF: read64le (tcc.h:1426) ==948== by 0x4159BF: relocate_section (tccelf.c:1112) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa62 is 14 bytes before a block of size 144 alloc'd ==948== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402685: tcc_malloc (libtcc.c:204) ==948== by 0x4026A9: tcc_mallocz (libtcc.c:213) ==948== by 0x414955: new_section (tccelf.c:132) ==948== by 0x4182D4: tcc_load_object_file (tccelf.c:3050) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== by 0x4167D8: elf_output_file (tccelf.c:2715) ==948== by 0x4167D8: tcc_output_file (tccelf.c:2905) ==948== ==948== Invalid read of size 1 ==948== at 0x4159C9: read16le (tcc.h:1414) ==948== by 0x4159C9: read32le (tcc.h:1420) ==948== by 0x4159C9: read64le (tcc.h:1426) ==948== by 0x4159C9: relocate_section (tccelf.c:1112) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa61 is 15 bytes before a block of size 144 alloc'd ==948== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402685: tcc_malloc (libtcc.c:204) ==948== by 0x4026A9: tcc_mallocz (libtcc.c:213) ==948== by 0x414955: new_section (tccelf.c:132) ==948== by 0x4182D4: tcc_load_object_file (tccelf.c:3050) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== by 0x4167D8: elf_output_file (tccelf.c:2715) ==948== by 0x4167D8: tcc_output_file (tccelf.c:2905) ==948== ==948== Invalid read of size 1 ==948== at 0x4159D5: read16le (tcc.h:1414) ==948== by 0x4159D5: read32le (tcc.h:1420) ==948== by 0x4159D5: read64le (tcc.h:1426) ==948== by 0x4159D5: relocate_section (tccelf.c:1112) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa60 is 16 bytes before a block of size 144 alloc'd ==948== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402685: tcc_malloc (libtcc.c:204) ==948== by 0x4026A9: tcc_mallocz (libtcc.c:213) ==948== by 0x414955: new_section (tccelf.c:132) ==948== by 0x4182D4: tcc_load_object_file (tccelf.c:3050) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== by 0x4167D8: elf_output_file (tccelf.c:2715) ==948== by 0x4167D8: tcc_output_file (tccelf.c:2905) ==948== ==948== Invalid read of size 1 ==948== at 0x4159E8: read16le (tcc.h:1414) ==948== by 0x4159E8: read32le (tcc.h:1420) ==948== by 0x4159E8: read64le (tcc.h:1426) ==948== by 0x4159E8: relocate_section (tccelf.c:1112) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa5f is 17 bytes before a block of size 144 alloc'd ==948== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402685: tcc_malloc (libtcc.c:204) ==948== by 0x4026A9: tcc_mallocz (libtcc.c:213) ==948== by 0x414955: new_section (tccelf.c:132) ==948== by 0x4182D4: tcc_load_object_file (tccelf.c:3050) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== by 0x4167D8: elf_output_file (tccelf.c:2715) ==948== by 0x4167D8: tcc_output_file (tccelf.c:2905) ==948== ==948== Invalid read of size 1 ==948== at 0x4159F1: read16le (tcc.h:1414) ==948== by 0x4159F1: read32le (tcc.h:1420) ==948== by 0x4159F1: read64le (tcc.h:1426) ==948== by 0x4159F1: relocate_section (tccelf.c:1112) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa5e is 18 bytes before a block of size 144 alloc'd ==948== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402685: tcc_malloc (libtcc.c:204) ==948== by 0x4026A9: tcc_mallocz (libtcc.c:213) ==948== by 0x414955: new_section (tccelf.c:132) ==948== by 0x4182D4: tcc_load_object_file (tccelf.c:3050) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== by 0x4167D8: elf_output_file (tccelf.c:2715) ==948== by 0x4167D8: tcc_output_file (tccelf.c:2905) ==948== ==948== Invalid read of size 1 ==948== at 0x415A00: read16le (tcc.h:1414) ==948== by 0x415A00: read32le (tcc.h:1420) ==948== by 0x415A00: read64le (tcc.h:1426) ==948== by 0x415A00: relocate_section (tccelf.c:1112) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa5d is 19 bytes before a block of size 144 alloc'd ==948== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402685: tcc_malloc (libtcc.c:204) ==948== by 0x4026A9: tcc_mallocz (libtcc.c:213) ==948== by 0x414955: new_section (tccelf.c:132) ==948== by 0x4182D4: tcc_load_object_file (tccelf.c:3050) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== by 0x4167D8: elf_output_file (tccelf.c:2715) ==948== by 0x4167D8: tcc_output_file (tccelf.c:2905) ==948== ==948== Invalid read of size 1 ==948== at 0x415A09: read16le (tcc.h:1414) ==948== by 0x415A09: read32le (tcc.h:1420) ==948== by 0x415A09: read64le (tcc.h:1426) ==948== by 0x415A09: relocate_section (tccelf.c:1112) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa5c is 20 bytes before a block of size 144 alloc'd ==948== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402685: tcc_malloc (libtcc.c:204) ==948== by 0x4026A9: tcc_mallocz (libtcc.c:213) ==948== by 0x414955: new_section (tccelf.c:132) ==948== by 0x4182D4: tcc_load_object_file (tccelf.c:3050) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== by 0x4167D8: elf_output_file (tccelf.c:2715) ==948== by 0x4167D8: tcc_output_file (tccelf.c:2905) ==948== ==948== Invalid write of size 1 ==948== at 0x415A1D: write16le (tcc.h:1417) ==948== by 0x415A1D: write32le (tcc.h:1423) ==948== by 0x415A1D: write64le (tcc.h:1429) ==948== by 0x415A1D: relocate_section (tccelf.c:1112) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa5c is 20 bytes before a block of size 144 alloc'd ==948== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402685: tcc_malloc (libtcc.c:204) ==948== by 0x4026A9: tcc_mallocz (libtcc.c:213) ==948== by 0x414955: new_section (tccelf.c:132) ==948== by 0x4182D4: tcc_load_object_file (tccelf.c:3050) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== by 0x4167D8: elf_output_file (tccelf.c:2715) ==948== by 0x4167D8: tcc_output_file (tccelf.c:2905) ==948== ==948== Invalid write of size 1 ==948== at 0x415A27: write16le (tcc.h:1417) ==948== by 0x415A27: write32le (tcc.h:1423) ==948== by 0x415A27: write64le (tcc.h:1429) ==948== by 0x415A27: relocate_section (tccelf.c:1112) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa5d is 19 bytes before a block of size 144 alloc'd ==948== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402685: tcc_malloc (libtcc.c:204) ==948== by 0x4026A9: tcc_mallocz (libtcc.c:213) ==948== by 0x414955: new_section (tccelf.c:132) ==948== by 0x4182D4: tcc_load_object_file (tccelf.c:3050) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== by 0x4167D8: elf_output_file (tccelf.c:2715) ==948== by 0x4167D8: tcc_output_file (tccelf.c:2905) ==948== ==948== Invalid write of size 1 ==948== at 0x415A30: write16le (tcc.h:1417) ==948== by 0x415A30: write32le (tcc.h:1423) ==948== by 0x415A30: write64le (tcc.h:1429) ==948== by 0x415A30: relocate_section (tccelf.c:1112) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa5e is 18 bytes before a block of size 144 alloc'd ==948== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402685: tcc_malloc (libtcc.c:204) ==948== by 0x4026A9: tcc_mallocz (libtcc.c:213) ==948== by 0x414955: new_section (tccelf.c:132) ==948== by 0x4182D4: tcc_load_object_file (tccelf.c:3050) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== by 0x4167D8: elf_output_file (tccelf.c:2715) ==948== by 0x4167D8: tcc_output_file (tccelf.c:2905) ==948== ==948== Invalid write of size 1 ==948== at 0x415A37: write16le (tcc.h:1417) ==948== by 0x415A37: write32le (tcc.h:1423) ==948== by 0x415A37: write64le (tcc.h:1429) ==948== by 0x415A37: relocate_section (tccelf.c:1112) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa5f is 17 bytes before a block of size 144 alloc'd ==948== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402685: tcc_malloc (libtcc.c:204) ==948== by 0x4026A9: tcc_mallocz (libtcc.c:213) ==948== by 0x414955: new_section (tccelf.c:132) ==948== by 0x4182D4: tcc_load_object_file (tccelf.c:3050) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== by 0x4167D8: elf_output_file (tccelf.c:2715) ==948== by 0x4167D8: tcc_output_file (tccelf.c:2905) ==948== ==948== Invalid write of size 1 ==948== at 0x415A3E: write16le (tcc.h:1417) ==948== by 0x415A3E: write32le (tcc.h:1423) ==948== by 0x415A3E: write64le (tcc.h:1429) ==948== by 0x415A3E: relocate_section (tccelf.c:1112) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa60 is 16 bytes before a block of size 144 alloc'd ==948== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402685: tcc_malloc (libtcc.c:204) ==948== by 0x4026A9: tcc_mallocz (libtcc.c:213) ==948== by 0x414955: new_section (tccelf.c:132) ==948== by 0x4182D4: tcc_load_object_file (tccelf.c:3050) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== by 0x4167D8: elf_output_file (tccelf.c:2715) ==948== by 0x4167D8: tcc_output_file (tccelf.c:2905) ==948== ==948== Invalid write of size 1 ==948== at 0x415A49: write16le (tcc.h:1417) ==948== by 0x415A49: write32le (tcc.h:1423) ==948== by 0x415A49: write64le (tcc.h:1429) ==948== by 0x415A49: relocate_section (tccelf.c:1112) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa61 is 15 bytes before a block of size 144 alloc'd ==948== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402685: tcc_malloc (libtcc.c:204) ==948== by 0x4026A9: tcc_mallocz (libtcc.c:213) ==948== by 0x414955: new_section (tccelf.c:132) ==948== by 0x4182D4: tcc_load_object_file (tccelf.c:3050) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== by 0x4167D8: elf_output_file (tccelf.c:2715) ==948== by 0x4167D8: tcc_output_file (tccelf.c:2905) ==948== ==948== Invalid write of size 1 ==948== at 0x415A50: write16le (tcc.h:1417) ==948== by 0x415A50: write32le (tcc.h:1423) ==948== by 0x415A50: write64le (tcc.h:1429) ==948== by 0x415A50: relocate_section (tccelf.c:1112) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa62 is 14 bytes before a block of size 144 alloc'd ==948== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402685: tcc_malloc (libtcc.c:204) ==948== by 0x4026A9: tcc_mallocz (libtcc.c:213) ==948== by 0x414955: new_section (tccelf.c:132) ==948== by 0x4182D4: tcc_load_object_file (tccelf.c:3050) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== by 0x4167D8: elf_output_file (tccelf.c:2715) ==948== by 0x4167D8: tcc_output_file (tccelf.c:2905) ==948== ==948== Invalid write of size 1 ==948== at 0x415A59: write16le (tcc.h:1417) ==948== by 0x415A59: write32le (tcc.h:1423) ==948== by 0x415A59: write64le (tcc.h:1429) ==948== by 0x415A59: relocate_section (tccelf.c:1112) ==948== by 0x4176AE: final_sections_reloc (tccelf.c:2530) ==948== by 0x4176AE: elf_output_file (tccelf.c:2877) ==948== by 0x4176AE: tcc_output_file (tccelf.c:2905) ==948== by 0x401E37: main (tcc.c:356) ==948== Address 0x593aa63 is 13 bytes before a block of size 144 alloc'd ==948== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==948== by 0x402685: tcc_malloc (libtcc.c:204) ==948== by 0x4026A9: tcc_mallocz (libtcc.c:213) ==948== by 0x414955: new_section (tccelf.c:132) ==948== by 0x4182D4: tcc_load_object_file (tccelf.c:3050) ==948== by 0x4187E1: tcc_load_alacarte (tccelf.c:3275) ==948== by 0x418A48: tcc_load_archive (tccelf.c:3326) ==948== by 0x4030CE: tcc_add_file_internal (libtcc.c:1090) ==948== by 0x403226: tcc_add_file (libtcc.c:1118) ==948== by 0x414401: tcc_add_support (tccelf.c:1772) ==948== by 0x416306: tcc_add_runtime (tccelf.c:1819) ==948== by 0x4167D8: elf_output_file (tccelf.c:2715) ==948== by 0x4167D8: tcc_output_file (tccelf.c:2905) ==948== ==948== ==948== HEAP SUMMARY: ==948== in use at exit: 0 bytes in 0 blocks ==948== total heap usage: 378 allocs, 378 frees, 2,506,851 bytes allocated ==948== ==948== All heap blocks were freed -- no leaks are possible ==948== ==948== For counts of detected and suppressed errors, rerun with: -v ==948== ERROR SUMMARY: 88 errors from 24 contexts (suppressed: 0 from 0)
==1242== Memcheck, a memory error detector ==1242== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==1242== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info ==1242== Command: /home/steffen/code.arena/tinycc.git/tcc -Wall -Wextra -pedantic -g -I/home/steffen/usr/include -I/home/steffen/usr/opt/tcc-mob/include -I/usr/local/include -I/usr/include -c mime_enc.c ==1242== mime_enc.c:165: error: 'a_ME_N' undeclared ==1242== Invalid read of size 8 ==1242== at 0x405AE2: end_macro (tccpp.c:1121) ==1242== by 0x409EA1: tccpp_delete (tccpp.c:3533) ==1242== by 0x4024DC: tcc_cleanup (libtcc.c:733) ==1242== by 0x402D23: tcc_delete (libtcc.c:908) ==1242== by 0x401EAE: main (tcc.c:364) ==1242== Address 0x5b02268 is 24 bytes inside a block of size 74 free'd ==1242== at 0x4C2BD3A: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==1242== by 0x4024C5: tcc_free (libtcc.c:198) ==1242== by 0x4024C5: dynarray_reset (libtcc.c:455) ==1242== by 0x40E35A: free_inline_functions (tccgen.c:6550) ==1242== by 0x40207E: tcc_compile (libtcc.c:672) ==1242== by 0x403044: tcc_add_file_internal (libtcc.c:1051) ==1242== by 0x403226: tcc_add_file (libtcc.c:1118) ==1242== by 0x401D4A: main (tcc.c:335) ==1242== Block was alloc'd at ==1242== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==1242== by 0x402685: tcc_malloc (libtcc.c:204) ==1242== by 0x413B67: decl0 (tccgen.c:6701) ==1242== by 0x40E36F: decl (tccgen.c:6814) ==1242== by 0x402111: tcc_compile (libtcc.c:665) ==1242== by 0x403044: tcc_add_file_internal (libtcc.c:1051) ==1242== by 0x403226: tcc_add_file (libtcc.c:1118) ==1242== by 0x401D4A: main (tcc.c:335) ==1242== ==1242== Invalid read of size 8 ==1242== at 0x405AED: end_macro (tccpp.c:1122) ==1242== by 0x409EA1: tccpp_delete (tccpp.c:3533) ==1242== by 0x4024DC: tcc_cleanup (libtcc.c:733) ==1242== by 0x402D23: tcc_delete (libtcc.c:908) ==1242== by 0x401EAE: main (tcc.c:364) ==1242== Address 0x5b02270 is 32 bytes inside a block of size 74 free'd ==1242== at 0x4C2BD3A: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==1242== by 0x4024C5: tcc_free (libtcc.c:198) ==1242== by 0x4024C5: dynarray_reset (libtcc.c:455) ==1242== by 0x40E35A: free_inline_functions (tccgen.c:6550) ==1242== by 0x40207E: tcc_compile (libtcc.c:672) ==1242== by 0x403044: tcc_add_file_internal (libtcc.c:1051) ==1242== by 0x403226: tcc_add_file (libtcc.c:1118) ==1242== by 0x401D4A: main (tcc.c:335) ==1242== Block was alloc'd at ==1242== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==1242== by 0x402685: tcc_malloc (libtcc.c:204) ==1242== by 0x413B67: decl0 (tccgen.c:6701) ==1242== by 0x40E36F: decl (tccgen.c:6814) ==1242== by 0x402111: tcc_compile (libtcc.c:665) ==1242== by 0x403044: tcc_add_file_internal (libtcc.c:1051) ==1242== by 0x403226: tcc_add_file (libtcc.c:1118) ==1242== by 0x401D4A: main (tcc.c:335) ==1242== ==1242== Invalid read of size 1 ==1242== at 0x405AF8: end_macro (tccpp.c:1123) ==1242== by 0x409EA1: tccpp_delete (tccpp.c:3533) ==1242== by 0x4024DC: tcc_cleanup (libtcc.c:733) ==1242== by 0x402D23: tcc_delete (libtcc.c:908) ==1242== by 0x401EAE: main (tcc.c:364) ==1242== Address 0x5b02278 is 40 bytes inside a block of size 74 free'd ==1242== at 0x4C2BD3A: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==1242== by 0x4024C5: tcc_free (libtcc.c:198) ==1242== by 0x4024C5: dynarray_reset (libtcc.c:455) ==1242== by 0x40E35A: free_inline_functions (tccgen.c:6550) ==1242== by 0x40207E: tcc_compile (libtcc.c:672) ==1242== by 0x403044: tcc_add_file_internal (libtcc.c:1051) ==1242== by 0x403226: tcc_add_file (libtcc.c:1118) ==1242== by 0x401D4A: main (tcc.c:335) ==1242== Block was alloc'd at ==1242== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==1242== by 0x402685: tcc_malloc (libtcc.c:204) ==1242== by 0x413B67: decl0 (tccgen.c:6701) ==1242== by 0x40E36F: decl (tccgen.c:6814) ==1242== by 0x402111: tcc_compile (libtcc.c:665) ==1242== by 0x403044: tcc_add_file_internal (libtcc.c:1051) ==1242== by 0x403226: tcc_add_file (libtcc.c:1118) ==1242== by 0x401D4A: main (tcc.c:335) ==1242== ==1242== Invalid read of size 8 ==1242== at 0x405AFE: end_macro (tccpp.c:1126) ==1242== by 0x409EA1: tccpp_delete (tccpp.c:3533) ==1242== by 0x4024DC: tcc_cleanup (libtcc.c:733) ==1242== by 0x402D23: tcc_delete (libtcc.c:908) ==1242== by 0x401EAE: main (tcc.c:364) ==1242== Address 0x5b02250 is 0 bytes inside a block of size 74 free'd ==1242== at 0x4C2BD3A: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==1242== by 0x4024C5: tcc_free (libtcc.c:198) ==1242== by 0x4024C5: dynarray_reset (libtcc.c:455) ==1242== by 0x40E35A: free_inline_functions (tccgen.c:6550) ==1242== by 0x40207E: tcc_compile (libtcc.c:672) ==1242== by 0x403044: tcc_add_file_internal (libtcc.c:1051) ==1242== by 0x403226: tcc_add_file (libtcc.c:1118) ==1242== by 0x401D4A: main (tcc.c:335) ==1242== Block was alloc'd at ==1242== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==1242== by 0x402685: tcc_malloc (libtcc.c:204) ==1242== by 0x413B67: decl0 (tccgen.c:6701) ==1242== by 0x40E36F: decl (tccgen.c:6814) ==1242== by 0x402111: tcc_compile (libtcc.c:665) ==1242== by 0x403044: tcc_add_file_internal (libtcc.c:1051) ==1242== by 0x403226: tcc_add_file (libtcc.c:1118) ==1242== by 0x401D4A: main (tcc.c:335) ==1242== ==1242== Invalid read of size 1 ==1242== at 0x405B06: end_macro (tccpp.c:1127) ==1242== by 0x409EA1: tccpp_delete (tccpp.c:3533) ==1242== by 0x4024DC: tcc_cleanup (libtcc.c:733) ==1242== by 0x402D23: tcc_delete (libtcc.c:908) ==1242== by 0x401EAE: main (tcc.c:364) ==1242== Address 0x5b02278 is 40 bytes inside a block of size 74 free'd ==1242== at 0x4C2BD3A: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==1242== by 0x4024C5: tcc_free (libtcc.c:198) ==1242== by 0x4024C5: dynarray_reset (libtcc.c:455) ==1242== by 0x40E35A: free_inline_functions (tccgen.c:6550) ==1242== by 0x40207E: tcc_compile (libtcc.c:672) ==1242== by 0x403044: tcc_add_file_internal (libtcc.c:1051) ==1242== by 0x403226: tcc_add_file (libtcc.c:1118) ==1242== by 0x401D4A: main (tcc.c:335) ==1242== Block was alloc'd at ==1242== at 0x4C2AB8D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==1242== by 0x402685: tcc_malloc (libtcc.c:204) ==1242== by 0x413B67: decl0 (tccgen.c:6701) ==1242== by 0x40E36F: decl (tccgen.c:6814) ==1242== by 0x402111: tcc_compile (libtcc.c:665) ==1242== by 0x403044: tcc_add_file_internal (libtcc.c:1051) ==1242== by 0x403226: tcc_add_file (libtcc.c:1118) ==1242== by 0x401D4A: main (tcc.c:335) ==1242== ==1242== ==1242== HEAP SUMMARY: ==1242== in use at exit: 0 bytes in 0 blocks ==1242== total heap usage: 827 allocs, 827 frees, 4,508,379 bytes allocated ==1242== ==1242== All heap blocks were freed -- no leaks are possible ==1242== ==1242== For counts of detected and suppressed errors, rerun with: -v ==1242== ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)
_______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
