bug-m4
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SIGBUS on Haiku [was: m4-1.4.15 on Haiku]


From: Eric Blake
Subject: SIGBUS on Haiku [was: m4-1.4.15 on Haiku]
Date: Fri, 31 Dec 2010 12:11:38 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

[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   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]