[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] fix to mhshow markers with multiple messages
From: |
David Levine |
Subject: |
Re: [Nmh-workers] fix to mhshow markers with multiple messages |
Date: |
Thu, 08 Feb 2018 19:45:13 -0500 |
Ken wrote:
> Huh, where are the accesses of free()d memory happening?
See below. But, it's now moot . . .
Ralph wrote:
# Separate from whether it's the right thing to do, rather than know it's
# the final call, I see fmt_free(NULL, 1) is possible at the end.
It works, so I'd say it's the right thing to do. I just committed a version
that calls compile_header() and compile_marker() for each message, with
reset_comptable disabled, and then calls fmt_free(NULL, 1) at the end.
David
==5308== Invalid write of size 8
==5308== at 0x411AF3: output_marker (mhshowsbr.c:1455)
==5308== by 0x40F9DE: show_content_aux2 (mhshowsbr.c:428)
==5308== by 0x40F885: show_content_aux (mhshowsbr.c:397)
==5308== by 0x40FEC9: show_text (mhshowsbr.c:549)
==5308== by 0x40F47B: show_switch (mhshowsbr.c:292)
==5308== by 0x410098: show_multi_internal (mhshowsbr.c:636)
==5308== by 0x40FF8E: show_multi (mhshowsbr.c:580)
==5308== by 0x40F3D6: show_switch (mhshowsbr.c:267)
==5308== by 0x40F01D: show_single_message (mhshowsbr.c:173)
==5308== by 0x40EF3F: show_all_messages (mhshowsbr.c:139)
==5308== by 0x40413A: main (mhshow.c:441)
==5308== Address 0x549a378 is 8 bytes inside a block of size 48 free'd
==5308== at 0x4C30D18: free (vg_replace_malloc.c:530)
==5308== by 0x4191F7: free_component (fmt_compile.c:1154)
==5308== by 0x41910E: free_comptable (fmt_compile.c:1129)
==5308== by 0x418ACE: fmt_free (fmt_compile.c:957)
==5308== by 0x40EF50: show_all_messages (mhshowsbr.c:141)
==5308== by 0x40413A: main (mhshow.c:441)
==5308== Block was alloc'd at
==5308== at 0x4C31A1E: calloc (vg_replace_malloc.c:711)
==5308== by 0x426710: mh_xcalloc (utils.c:84)
==5308== by 0x417309: do_name (fmt_compile.c:556)
==5308== by 0x416FFA: do_spec (fmt_compile.c:511)
==5308== by 0x416F0B: compile (fmt_compile.c:478)
==5308== by 0x4188F6: do_if (fmt_compile.c:902)
==5308== by 0x416EB7: compile (fmt_compile.c:464)
==5308== by 0x416C48: fmt_compile (fmt_compile.c:416)
==5308== by 0x41169A: compile_marker (mhshowsbr.c:1345)
==5308== by 0x40EED4: show_all_messages (mhshowsbr.c:128)
==5308== by 0x40413A: main (mhshow.c:441)
==5308==
==5308== Invalid write of size 8
==5308== at 0x411B40: output_marker (mhshowsbr.c:1460)
==5308== by 0x40F9DE: show_content_aux2 (mhshowsbr.c:428)
==5308== by 0x40F885: show_content_aux (mhshowsbr.c:397)
==5308== by 0x40FEC9: show_text (mhshowsbr.c:549)
==5308== by 0x40F47B: show_switch (mhshowsbr.c:292)
==5308== by 0x410098: show_multi_internal (mhshowsbr.c:636)
==5308== by 0x40FF8E: show_multi (mhshowsbr.c:580)
==5308== by 0x40F3D6: show_switch (mhshowsbr.c:267)
==5308== by 0x40F01D: show_single_message (mhshowsbr.c:173)
==5308== by 0x40EF3F: show_all_messages (mhshowsbr.c:139)
==5308== by 0x40413A: main (mhshow.c:441)
==5308== Address 0x549a2b8 is 8 bytes inside a block of size 48 free'd
==5308== at 0x4C30D18: free (vg_replace_malloc.c:530)
==5308== by 0x4191F7: free_component (fmt_compile.c:1154)
==5308== by 0x41910E: free_comptable (fmt_compile.c:1129)
==5308== by 0x418ACE: fmt_free (fmt_compile.c:957)
==5308== by 0x40EF50: show_all_messages (mhshowsbr.c:141)
==5308== by 0x40413A: main (mhshow.c:441)
==5308== Block was alloc'd at
==5308== at 0x4C31A1E: calloc (vg_replace_malloc.c:711)
==5308== by 0x426710: mh_xcalloc (utils.c:84)
==5308== by 0x417309: do_name (fmt_compile.c:556)
==5308== by 0x41868D: do_if (fmt_compile.c:865)
==5308== by 0x416EB7: compile (fmt_compile.c:464)
==5308== by 0x416C48: fmt_compile (fmt_compile.c:416)
==5308== by 0x41169A: compile_marker (mhshowsbr.c:1345)
==5308== by 0x40EED4: show_all_messages (mhshowsbr.c:128)
==5308== by 0x40413A: main (mhshow.c:441)
Re: [Nmh-workers] fix to mhshow markers with multiple messages, Ralph Corderoy, 2018/02/08