Heap Corruption caused by mb_exec_compile #9

Closed
opened 2023-06-28 20:04:39 +02:00 by MarieEckert · 4 comments
MarieEckert commented 2023-06-28 20:04:39 +02:00 (Migrated from github.com)

mb_exec_compile seems to cause heap corruption which causes mb_exec_finalize to fail and will cause further problems down the line. This issue is very urgent

mb_exec_compile seems to cause heap corruption which causes mb_exec_finalize to fail and will cause further problems down the line. This issue is very urgent
MarieEckert commented 2023-06-28 20:19:55 +02:00 (Migrated from github.com)

The valgrind log:

==65558== Invalid read of size 8
==65558==    at 0x10B5DE: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==  Address 0x4a6f528 is 136 bytes inside a block of size 160 free'd
==65558==    at 0x4846BE0: realloc (vg_replace_malloc.c:1649)
==65558==    by 0x109E48: register_field (mb_parse.c:146)
==65558==    by 0x10B486: mb_exec_compile (mb_execute.c:79)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==  Block was alloc'd at
==65558==    at 0x4846BE0: realloc (vg_replace_malloc.c:1649)
==65558==    by 0x109E48: register_field (mb_parse.c:146)
==65558==    by 0x10A2AE: parse_line (mb_parse.c:216)
==65558==    by 0x10A51F: parse_file (mb_parse.c:270)
==65558==    by 0x10BB53: main (mb.c:44)
==65558==
==65558== Invalid write of size 1
==65558==    at 0x10ACFD: resolve_fields (mb_parse.c:439)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==  Address 0x4a70bfb is 0 bytes after a block of size 27 alloc'd
==65558==    at 0x4841848: malloc (vg_replace_malloc.c:431)
==65558==    by 0x10AB50: resolve_fields (mb_parse.c:420)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==
==65558== Invalid read of size 1
==65558==    at 0x4847ED4: strlen (vg_replace_strmem.c:501)
==65558==    by 0x10A644: get_path_elem (mb_parse.c:310)
==65558==    by 0x10A85E: find_field (mb_parse.c:358)
==65558==    by 0x10AD0E: resolve_fields (mb_parse.c:441)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==  Address 0x4a70bfb is 0 bytes after a block of size 27 alloc'd
==65558==    at 0x4841848: malloc (vg_replace_malloc.c:431)
==65558==    by 0x10AB50: resolve_fields (mb_parse.c:420)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==
==65558== Invalid read of size 1
==65558==    at 0x4847ED4: strlen (vg_replace_strmem.c:501)
==65558==    by 0x10A5D2: get_path_elem (mb_parse.c:302)
==65558==    by 0x10A873: find_field (mb_parse.c:359)
==65558==    by 0x10AD0E: resolve_fields (mb_parse.c:441)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==  Address 0x4a70bfb is 0 bytes after a block of size 27 alloc'd
==65558==    at 0x4841848: malloc (vg_replace_malloc.c:431)
==65558==    by 0x10AB50: resolve_fields (mb_parse.c:420)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==
==65558== Invalid read of size 1
==65558==    at 0x4847ED4: strlen (vg_replace_strmem.c:501)
==65558==    by 0x10A644: get_path_elem (mb_parse.c:310)
==65558==    by 0x10A873: find_field (mb_parse.c:359)
==65558==    by 0x10AD0E: resolve_fields (mb_parse.c:441)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==  Address 0x4a70bfb is 0 bytes after a block of size 27 alloc'd
==65558==    at 0x4841848: malloc (vg_replace_malloc.c:431)
==65558==    by 0x10AB50: resolve_fields (mb_parse.c:420)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==
==65558== Invalid read of size 1
==65558==    at 0x4847ED4: strlen (vg_replace_strmem.c:501)
==65558==    by 0x10A5D2: get_path_elem (mb_parse.c:302)
==65558==    by 0x10A888: find_field (mb_parse.c:360)
==65558==    by 0x10AD0E: resolve_fields (mb_parse.c:441)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==  Address 0x4a70bfb is 0 bytes after a block of size 27 alloc'd
==65558==    at 0x4841848: malloc (vg_replace_malloc.c:431)
==65558==    by 0x10AB50: resolve_fields (mb_parse.c:420)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==
==65558== Invalid read of size 1
==65558==    at 0x4847ED4: strlen (vg_replace_strmem.c:501)
==65558==    by 0x10A644: get_path_elem (mb_parse.c:310)
==65558==    by 0x10A888: find_field (mb_parse.c:360)
==65558==    by 0x10AD0E: resolve_fields (mb_parse.c:441)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==  Address 0x4a70bfb is 0 bytes after a block of size 27 alloc'd
==65558==    at 0x4841848: malloc (vg_replace_malloc.c:431)
==65558==    by 0x10AB50: resolve_fields (mb_parse.c:420)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==
==65558== Invalid write of size 4
==65558==    at 0x10ADF2: resolve_fields (mb_parse.c:454)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==  Address 0x4a70af4 is 0 bytes after a block of size 4 alloc'd
==65558==    at 0x4841848: malloc (vg_replace_malloc.c:431)
==65558==    by 0x10AA12: resolve_fields (mb_parse.c:398)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==
==65558== Invalid write of size 4
==65558==    at 0x10AE11: resolve_fields (mb_parse.c:455)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==  Address 0x4a70b44 is 0 bytes after a block of size 4 alloc'd
==65558==    at 0x4841848: malloc (vg_replace_malloc.c:431)
==65558==    by 0x10AA20: resolve_fields (mb_parse.c:399)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==
==65558== Invalid write of size 8
==65558==    at 0x10AE2E: resolve_fields (mb_parse.c:456)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==  Address 0x4a70b98 is 0 bytes after a block of size 8 alloc'd
==65558==    at 0x4841848: malloc (vg_replace_malloc.c:431)
==65558==    by 0x10AA2E: resolve_fields (mb_parse.c:400)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==
==65558== Use of uninitialised value of size 8
==65558==    at 0x4848765: strncmp (vg_replace_strmem.c:716)
==65558==    by 0x1095C4: str_startswith (mb_utils.c:150)
==65558==    by 0x10AC16: resolve_fields (mb_parse.c:427)
==65558==    by 0x10AD53: resolve_fields (mb_parse.c:445)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==
==65558== Invalid read of size 1
==65558==    at 0x4848765: strncmp (vg_replace_strmem.c:716)
==65558==    by 0x1095C4: str_startswith (mb_utils.c:150)
==65558==    by 0x10AC16: resolve_fields (mb_parse.c:427)
==65558==    by 0x10AD53: resolve_fields (mb_parse.c:445)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==65558==
==65558==
==65558== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==65558==  Access not within mapped region at address 0x0
==65558==    at 0x4848765: strncmp (vg_replace_strmem.c:716)
==65558==    by 0x1095C4: str_startswith (mb_utils.c:150)
==65558==    by 0x10AC16: resolve_fields (mb_parse.c:427)
==65558==    by 0x10AD53: resolve_fields (mb_parse.c:445)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==  If you believe this happened as a result of a stack
==65558==  overflow in your program's main thread (unlikely but
==65558==  possible), you can try to increase the size of the
==65558==  main thread stack using the --main-stacksize= flag.
==65558==  The main thread stack size used in this run was 8388608.
==65558==
==65558== HEAP SUMMARY:
==65558==     in use at exit: 1,917 bytes in 53 blocks
==65558==   total heap usage: 177 allocs, 124 frees, 9,382 bytes allocated
==65558==
==65558== 8 bytes in 2 blocks are definitely lost in loss record 11 of 26
==65558==    at 0x4841848: malloc (vg_replace_malloc.c:431)
==65558==    by 0x10AA12: resolve_fields (mb_parse.c:398)
==65558==    by 0x10AD53: resolve_fields (mb_parse.c:445)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==
==65558== 8 bytes in 2 blocks are definitely lost in loss record 12 of 26
==65558==    at 0x4841848: malloc (vg_replace_malloc.c:431)
==65558==    by 0x10AA20: resolve_fields (mb_parse.c:399)
==65558==    by 0x10AD53: resolve_fields (mb_parse.c:445)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==
==65558== 16 bytes in 2 blocks are definitely lost in loss record 15 of 26
==65558==    at 0x4841848: malloc (vg_replace_malloc.c:431)
==65558==    by 0x10AA2E: resolve_fields (mb_parse.c:400)
==65558==    by 0x10AD53: resolve_fields (mb_parse.c:445)
==65558==    by 0x10B61C: mb_exec_compile (mb_execute.c:104)
==65558==    by 0x10B8E4: mb_exec_build (mb_execute.c:160)
==65558==    by 0x10BC69: main (mb.c:70)
==65558==
==65558== LEAK SUMMARY:
==65558==    definitely lost: 32 bytes in 6 blocks
==65558==    indirectly lost: 0 bytes in 0 blocks
==65558==      possibly lost: 0 bytes in 0 blocks
==65558==    still reachable: 1,885 bytes in 47 blocks
==65558==         suppressed: 0 bytes in 0 blocks
==65558== Reachable blocks (those to which a pointer was found) are not shown.
==65558== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==65558==
==65558== Use --track-origins=yes to see where uninitialised values come from
==65558== For lists of detected and suppressed errors, rerun with: -s
==65558== ERROR SUMMARY: 171 errors from 15 contexts (suppressed: 0 from 0)
The valgrind log: ``` ==65558== Invalid read of size 8 ==65558== at 0x10B5DE: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== Address 0x4a6f528 is 136 bytes inside a block of size 160 free'd ==65558== at 0x4846BE0: realloc (vg_replace_malloc.c:1649) ==65558== by 0x109E48: register_field (mb_parse.c:146) ==65558== by 0x10B486: mb_exec_compile (mb_execute.c:79) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== Block was alloc'd at ==65558== at 0x4846BE0: realloc (vg_replace_malloc.c:1649) ==65558== by 0x109E48: register_field (mb_parse.c:146) ==65558== by 0x10A2AE: parse_line (mb_parse.c:216) ==65558== by 0x10A51F: parse_file (mb_parse.c:270) ==65558== by 0x10BB53: main (mb.c:44) ==65558== ==65558== Invalid write of size 1 ==65558== at 0x10ACFD: resolve_fields (mb_parse.c:439) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== Address 0x4a70bfb is 0 bytes after a block of size 27 alloc'd ==65558== at 0x4841848: malloc (vg_replace_malloc.c:431) ==65558== by 0x10AB50: resolve_fields (mb_parse.c:420) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== ==65558== Invalid read of size 1 ==65558== at 0x4847ED4: strlen (vg_replace_strmem.c:501) ==65558== by 0x10A644: get_path_elem (mb_parse.c:310) ==65558== by 0x10A85E: find_field (mb_parse.c:358) ==65558== by 0x10AD0E: resolve_fields (mb_parse.c:441) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== Address 0x4a70bfb is 0 bytes after a block of size 27 alloc'd ==65558== at 0x4841848: malloc (vg_replace_malloc.c:431) ==65558== by 0x10AB50: resolve_fields (mb_parse.c:420) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== ==65558== Invalid read of size 1 ==65558== at 0x4847ED4: strlen (vg_replace_strmem.c:501) ==65558== by 0x10A5D2: get_path_elem (mb_parse.c:302) ==65558== by 0x10A873: find_field (mb_parse.c:359) ==65558== by 0x10AD0E: resolve_fields (mb_parse.c:441) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== Address 0x4a70bfb is 0 bytes after a block of size 27 alloc'd ==65558== at 0x4841848: malloc (vg_replace_malloc.c:431) ==65558== by 0x10AB50: resolve_fields (mb_parse.c:420) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== ==65558== Invalid read of size 1 ==65558== at 0x4847ED4: strlen (vg_replace_strmem.c:501) ==65558== by 0x10A644: get_path_elem (mb_parse.c:310) ==65558== by 0x10A873: find_field (mb_parse.c:359) ==65558== by 0x10AD0E: resolve_fields (mb_parse.c:441) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== Address 0x4a70bfb is 0 bytes after a block of size 27 alloc'd ==65558== at 0x4841848: malloc (vg_replace_malloc.c:431) ==65558== by 0x10AB50: resolve_fields (mb_parse.c:420) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== ==65558== Invalid read of size 1 ==65558== at 0x4847ED4: strlen (vg_replace_strmem.c:501) ==65558== by 0x10A5D2: get_path_elem (mb_parse.c:302) ==65558== by 0x10A888: find_field (mb_parse.c:360) ==65558== by 0x10AD0E: resolve_fields (mb_parse.c:441) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== Address 0x4a70bfb is 0 bytes after a block of size 27 alloc'd ==65558== at 0x4841848: malloc (vg_replace_malloc.c:431) ==65558== by 0x10AB50: resolve_fields (mb_parse.c:420) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== ==65558== Invalid read of size 1 ==65558== at 0x4847ED4: strlen (vg_replace_strmem.c:501) ==65558== by 0x10A644: get_path_elem (mb_parse.c:310) ==65558== by 0x10A888: find_field (mb_parse.c:360) ==65558== by 0x10AD0E: resolve_fields (mb_parse.c:441) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== Address 0x4a70bfb is 0 bytes after a block of size 27 alloc'd ==65558== at 0x4841848: malloc (vg_replace_malloc.c:431) ==65558== by 0x10AB50: resolve_fields (mb_parse.c:420) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== ==65558== Invalid write of size 4 ==65558== at 0x10ADF2: resolve_fields (mb_parse.c:454) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== Address 0x4a70af4 is 0 bytes after a block of size 4 alloc'd ==65558== at 0x4841848: malloc (vg_replace_malloc.c:431) ==65558== by 0x10AA12: resolve_fields (mb_parse.c:398) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== ==65558== Invalid write of size 4 ==65558== at 0x10AE11: resolve_fields (mb_parse.c:455) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== Address 0x4a70b44 is 0 bytes after a block of size 4 alloc'd ==65558== at 0x4841848: malloc (vg_replace_malloc.c:431) ==65558== by 0x10AA20: resolve_fields (mb_parse.c:399) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== ==65558== Invalid write of size 8 ==65558== at 0x10AE2E: resolve_fields (mb_parse.c:456) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== Address 0x4a70b98 is 0 bytes after a block of size 8 alloc'd ==65558== at 0x4841848: malloc (vg_replace_malloc.c:431) ==65558== by 0x10AA2E: resolve_fields (mb_parse.c:400) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== ==65558== Use of uninitialised value of size 8 ==65558== at 0x4848765: strncmp (vg_replace_strmem.c:716) ==65558== by 0x1095C4: str_startswith (mb_utils.c:150) ==65558== by 0x10AC16: resolve_fields (mb_parse.c:427) ==65558== by 0x10AD53: resolve_fields (mb_parse.c:445) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== ==65558== Invalid read of size 1 ==65558== at 0x4848765: strncmp (vg_replace_strmem.c:716) ==65558== by 0x1095C4: str_startswith (mb_utils.c:150) ==65558== by 0x10AC16: resolve_fields (mb_parse.c:427) ==65558== by 0x10AD53: resolve_fields (mb_parse.c:445) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==65558== ==65558== ==65558== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==65558== Access not within mapped region at address 0x0 ==65558== at 0x4848765: strncmp (vg_replace_strmem.c:716) ==65558== by 0x1095C4: str_startswith (mb_utils.c:150) ==65558== by 0x10AC16: resolve_fields (mb_parse.c:427) ==65558== by 0x10AD53: resolve_fields (mb_parse.c:445) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== If you believe this happened as a result of a stack ==65558== overflow in your program's main thread (unlikely but ==65558== possible), you can try to increase the size of the ==65558== main thread stack using the --main-stacksize= flag. ==65558== The main thread stack size used in this run was 8388608. ==65558== ==65558== HEAP SUMMARY: ==65558== in use at exit: 1,917 bytes in 53 blocks ==65558== total heap usage: 177 allocs, 124 frees, 9,382 bytes allocated ==65558== ==65558== 8 bytes in 2 blocks are definitely lost in loss record 11 of 26 ==65558== at 0x4841848: malloc (vg_replace_malloc.c:431) ==65558== by 0x10AA12: resolve_fields (mb_parse.c:398) ==65558== by 0x10AD53: resolve_fields (mb_parse.c:445) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== ==65558== 8 bytes in 2 blocks are definitely lost in loss record 12 of 26 ==65558== at 0x4841848: malloc (vg_replace_malloc.c:431) ==65558== by 0x10AA20: resolve_fields (mb_parse.c:399) ==65558== by 0x10AD53: resolve_fields (mb_parse.c:445) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== ==65558== 16 bytes in 2 blocks are definitely lost in loss record 15 of 26 ==65558== at 0x4841848: malloc (vg_replace_malloc.c:431) ==65558== by 0x10AA2E: resolve_fields (mb_parse.c:400) ==65558== by 0x10AD53: resolve_fields (mb_parse.c:445) ==65558== by 0x10B61C: mb_exec_compile (mb_execute.c:104) ==65558== by 0x10B8E4: mb_exec_build (mb_execute.c:160) ==65558== by 0x10BC69: main (mb.c:70) ==65558== ==65558== LEAK SUMMARY: ==65558== definitely lost: 32 bytes in 6 blocks ==65558== indirectly lost: 0 bytes in 0 blocks ==65558== possibly lost: 0 bytes in 0 blocks ==65558== still reachable: 1,885 bytes in 47 blocks ==65558== suppressed: 0 bytes in 0 blocks ==65558== Reachable blocks (those to which a pointer was found) are not shown. ==65558== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==65558== ==65558== Use --track-origins=yes to see where uninitialised values come from ==65558== For lists of detected and suppressed errors, rerun with: -s ==65558== ERROR SUMMARY: 171 errors from 15 contexts (suppressed: 0 from 0) ```
MarieEckert commented 2023-06-28 20:41:06 +02:00 (Migrated from github.com)

Invalid writes fixed with commit d869863

fixing of invalid reads and memory leaks now in progress

Invalid writes fixed with commit [d869863](https://github.com/FelixEcker/mariebuild/commit/d8698637fdb5367faf7e255a6169f12f1b370ede) fixing of invalid reads and memory leaks now in progress
MarieEckert commented 2023-06-28 20:49:45 +02:00 (Migrated from github.com)

Invalid reads fixed with commit 50dceb6

Invalid reads fixed with commit [50dceb6](https://github.com/FelixEcker/mariebuild/commit/50dceb6069e453f6fca2104e46263da334dc1168)
MarieEckert commented 2023-06-28 20:51:36 +02:00 (Migrated from github.com)

Memory Leaks fixed with commit 6f866e8

Memory Leaks fixed with commit [6f866e8](https://github.com/FelixEcker/mariebuild/commit/6f866e8a2b930e48b388a2e2bf3a531e8bf73fce)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
marie/mariebuild#9
No description provided.