bug-hurd
[Top][All Lists]
Advanced

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

Is that supposed to happen?


From: Samuel Thibault
Subject: Is that supposed to happen?
Date: Sun, 12 Apr 2009 02:06:09 +0200
User-agent: Mutt/1.5.12-2006-07-14

Hello,

I'm currently checking why the exec server still sometimes get trapped,
I've come across a case in load_section() that looks strange to me:

  vm_address_t overlap_page = trunc_page (addr);
/* So addr is in the page starting at overlap_page */

  vm_address_t ourpage = 0;
  vm_size_t size = 0;
  u->error = vm_read (u->task, overlap_page, vm_page_size,
                      &ourpage, &size);
  if (u->error)
    {
      vm_deallocate (u->task, mapstart, memsz);
      return;
    }
  u->error = safe_bzero ((void *) (ourpage + (addr - overlap_page)),
                         size - (addr - overlap_page));

Here exec is getting an fault exception at the very beginning of
safe_bzero. gnumach's show map command tells me that there indeed is no
mapping at address ourpage!  More precisely, there is a whole: there's a
mapping just before, and another just after.  I do not know the semantic
of vm_read() very well, but I thought there should at least be a map at
the address it returns, shouldn't there?

(yes of course the exception is catched by safe_bzero, but AIUI that's
still not supposed to happen and is a bug worth checking out).

Samuel




reply via email to

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