This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Mmap tests on the Hurd
- To: zackw at stanford dot edu
- Subject: Mmap tests on the Hurd
- From: Mark Kettenis <kettenis at wins dot uva dot nl>
- Date: Sun, 21 Jan 2001 16:45:43 +0100
- CC: gcc at gcc dot gnu dot org, roland at frob dot com
Hi Zack,
I'm having some "problems" with the mmap tests on the Hurd:
1. Mapping a 2-page region, unmapping its second page and accessing
that second page generates a SIGBUS instead of a SIGSEGV. It looks
as if POSIX demands SIGSEGV, but I'm not exactly sure and SIGBUS
doesn't sound unreasonable (unmapping the second page can be seen
as shrinking the memory object, so in a way we're accessing an
undefined part of a memory object here). Anyway, the Hurd's is
pretty much determined by the behaviour of the Mach kernel, so it
wouldn't really surprise me if there were more systems out there
that show this behaviour (especially if they're Mach bases).
As a sidenote, the fact that the autoconf tests die with a fatal
signal is a bit annoying, since the Hurd's default behaviour is to
suspend the program instead of dumping core (such that you can
attach the debugger to it) which means that the whole configuration
process is suspended.
Anyway, would you accept a patch to the tests that would trap
SIGBUS as well as SIGSEGV?
2. The Hurd is "so perverse as to leave unmapped space between
consecutive calls to mmap" :-). I'm not exactly sure why. It can
probably be blamed on Mach, or there might be a "bug" in the Hurd's
mmap implementation here. Do you really need this behaviour?
Thanks,
Mark