[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug report and patch: handling of chained wrapups
From: |
john |
Subject: |
bug report and patch: handling of chained wrapups |
Date: |
Tue, 24 Jan 2006 14:31:22 -0500 |
Hello,
There is a bug in how GNU m4 processes text saved with m4wrap()
once it is already using such text as input.
The behaviour is exposed by:
$ m4
m4wrap(`m4wrap(a)m4wrap(b)')
^D
which on my system, enters an infinite loop, instead of printing
"ba". The underlying problem, interleaved writing to an obstack, can
cause aborts and segmentation faults, depending on the context.
Gory details and analysis are in the attached PDF.
A simple patch against m4-1.4.4 to fix this bug is also attached.
The patch is orthogonal to my previous "dangling pointer" patch.
The fix is simple, but in any case I hereby assign copyright in
it to the Free Software Foundation.
RFC: perhaps examples from the PDF should be added to the
texinfo docs and the "checks" directory?
Regards,
John B.
P.S. If I should be doing this via Savannah, please advise.
--
John Brzustowski - http://www.ProgramOrPerish.com
m4bug2.pdf
Description: m4bug2.pdf
m4_1.4.4-2.diff.gz
Description: m4_1.4.4-2.diff.gz
- bug report and patch: handling of chained wrapups,
john <=