Ken wrote:
I am wondering if the buffer reuse in scansbr.c is still warranted; should
we just accept the price of a bunch of malloc/free calls?
Yes.
Ralph wrote:
# I suspect it's all related and the `free (comp->c_text)' above is key.
# #1 0x000055555555ef4a in fmt_scan (format=<optimized out>,
scanlp=<optimized out>, width=114,
# dat=dat@entry=0x55555557b810 <dat>, callbacks=callbacks@entry=0x0) at
sbr/fmt_scan.c:1134
If I'm looking at the right version, that's here (line 1134 is (was) the
mnfree()):
if (comp->c_mn != &fmt_mnull)
mnfree (comp->c_mn);
So if c_mn was assigned the address of something other than fmt_mnull that
wasn't
alloc'ed, then there would be a problem. But I don't see in the code where that
could happen. (c_mn is assigned the result of getm(), but that's either an
alloc'ed value or NULL.)
David
--
Nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers