On Haiku, SIGBUS == SIGSEGV, so we were overwriting a malloc'd string for a (minor) memory leak.
* src/m4.c (main): Avoid leak when SIGBUS == SIGSEGV. * THANKS: Update. Reported by Scott McCreary. Signed-off-by: Eric Blake <ebl...@redhat.com> --- ChangeLog | 7 +++++++ THANKS | 1 + gnulib | 2 +- src/m4.c | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index dcefbe7..a175613 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-12-31 Eric Blake <ebl...@redhat.com> + + main: avoid leaking string on Haiku + * src/m4.c (main): Avoid leak when SIGBUS == SIGSEGV. + * THANKS: Update. + Reported by Scott McCreary. + 2010-12-24 Eric Blake <ebl...@redhat.com> build: pull in various gnulib fixes diff --git a/THANKS b/THANKS index b0f0c19..e1c0295 100644 --- a/THANKS +++ b/THANKS diff --git a/src/m4.c b/src/m4.c index 3905ba1..42dbf65 100644 --- a/src/m4.c +++ b/src/m4.c @@ -397,7 +397,7 @@ main (int argc, char *const *argv) signal_message[SIGABRT] = xstrdup (strsignal (SIGABRT)); signal_message[SIGILL] = xstrdup (strsignal (SIGILL)); signal_message[SIGFPE] = xstrdup (strsignal (SIGFPE)); - if (SIGBUS != SIGILL) + if (SIGBUS != SIGILL && SIGBUS != SIGSEGV) signal_message[SIGBUS] = xstrdup (strsignal (SIGBUS)); sigemptyset (&act.sa_mask); /* One-shot - if we fault while handling a fault, we want to revert -- 1.7.3.4 _______________________________________________ M4-patches mailing list M4-patches@gnu.org http://lists.gnu.org/mailman/listinfo/m4-patches