[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: abort() on Windows 2008 Server
From: |
Eric Blake |
Subject: |
Re: abort() on Windows 2008 Server |
Date: |
Sat, 18 Oct 2008 11:14:43 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080914 Thunderbird/2.0.0.17 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Ramiro Polla on 10/18/2008 10:55 AM:
Hello Ramiro, and thanks for the report.
> Hello,
>
> GNU m4 1.4.12 abort()s running on Windows 2008 Server. It doesn't go
> further than setting the signal handlers, so any call to m4.exe will
> fail. The problem does not occur with Windows XP. The build was made
> using MinGW gcc 4.2.4, mingw-runtime 3.15.1, w32api 3.12.
>
> The reason:
> The loop at sigprocmask.c:197 tests signal() on all signals up to NSIG
> for SIG_ERR. On some version of Windows (I haven't checked which one,
> but it affects Windows 2008 Server), a new signal has been added. It
> is the SIGABRT_COMPAT signal, which is the same as SIGABRT [0]. So on
> that loop, signal() is called twice for the same signal.
Ouch. This means gnulib has not yet been ported to this newer mingw setup.
>
> The abort() on sigprocmask.c:218 has the comment:
> /* The application changed a signal handler while the signal
> was blocked, bypassing our rpl_signal replacement.
> We don't support this. */
>
> Actually you are changing it yourself. Once for signal 6 (which is the
> value of SIGABRT_COMPAT), and then again for 22 (SIGABRT).
>
> Suggested ugly fix:
> for (sig = 0; sig < NSIG; sig++)
> if ((to_block >> sig) & 1)
> {
> pending_array[sig] = 0;
> + if (sig == 6)
> + continue;
> if ((old_handlers[sig] = signal (sig, blocked_handler)) != SIG_ERR)
> blocked_set |= 1U << sig;
> }
> }
>
> Ugly hack, I know, not meant to be applied as is. I'm sure you'll have
> a better idea. MinGW still doesn't have a define for the new signal...
>
> Ramiro Polla
> [0] http://msdn.microsoft.com/en-us/library/5s651ehs(VS.80).aspx
Thanks for the link. I'm hoping developers more familiar with mingw will
help out here (in particular, Bruno helped write this module). I
personally don't have access to a mingw system atop Windows 2008, so I
can't really do much testing; we may be relying on you for support.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkj6GYMACgkQ84KuGfSFAYBm+gCfT0nUB6CYh2yO4Rfs7Eobg98W
6y4AoK6IfHLwEdoUytRJ59IgVaYdbm6H
=ZUIZ
-----END PGP SIGNATURE-----