This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Mmap tests on the Hurd


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]