[adding bug-gnulib and bug-m4] On 12/31/2010 11:44 AM, scott mc wrote: >>> I have updated the Haiku patch a bit for it after rereading Ingo's >>> (bonefish) patch for 1.4.12: >>> http://ports.haiku-files.org/wiki/sys-devel/m4 (his notes are under >>> the 1.4.12 header) >>> http://ports.haiku-files.org/browser/haikuports/trunk/sys-devel/m4/patches/m4-1.4.12.diff >>> Part of the 1.4.12 patch was upstreamed.
Thanks for the link. First, I'm going to focus on the efforts to fix m4's use of SIGBUS: >> Is SIGBUS really equal to SIGSEGV on Haiku? This is a violation of >> POSIX, but one we can probably work around. >> > > I opened a Haiku trac ticket awhile back to make sure the SIGSEGV and > SIGBUS issue gets worked out: > https://dev.haiku-os.org/ticket/6704 > Fixing it may be a binary compatibility issue with old BeOS apps so it > might get pushed out till Haiku R2 which isn't required to be binary > compatible to BeOS. Thanks for tracking that. In glancing through gnulib uses of SIGBUS, it looks like most are harmless (it may end up associating the same handler with SIGSEGV twice in a row), but at least tests/test-signal.c will fail if we don't modify it to account for this bug. Also, we want to favor the name SIGSEGV in lists like strsignal(SIGBUS). And documenting the bug can't hurt. Patch coming up shortly. Meanwhile, the patch at http://ports.haiku-files.org/browser/haikuports/trunk/sys-devel/m4/m4-1.4.12.diff?rev=179 for m4's src/m4.c does serve to avoid a minor memory leak (using xstrdup twice on the same string for both SIGSEGV and SIGBUS), but it doesn't change any other behavior (calling c_stack_action after sigaction(SIGBUS) will properly set up the stack overflow handler, because it overrides the original sigbus/sigsegv handler, whereas the patch had the minor optimization of not installing an original sigbus handler in the first place). -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature