nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] GCC 8 pre-releases have escaped...

2018-02-11 09:07:04
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

<Prev in Thread] Current Thread [Next in Thread>