public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug pch/48004] doesn't work with randomize_va_space
Date: Mon, 07 Mar 2011 11:07:00 -0000	[thread overview]
Message-ID: <bug-48004-4-4iJP7qzZNt@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-48004-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48004

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-07 11:07:33 UTC ---
We can't simply use MAP_FIXED, as that will discard existing overlapping
mappings.

       MAP_FIXED
              Don't interpret addr as a hint: place  the  mapping  at  exactly
              that address.  addr must be a multiple of the page size.  If the
              memory region specified by addr and len overlaps  pages  of  any
              existing  mapping(s),  then  the overlapped part of the existing
              mapping(s) will be discarded.  If the specified  address  cannot
              be  used,  mmap()  will fail.  Because requiring a fixed address
              for a mapping is less portable, the use of this option  is  dis-
              couraged.

So we'd need to portably check for existing mappings in the range we want
to request.  I don't think that is desirable (if only from a performance
perspective).  The only way to do this that I can think of is parsing
/proc or installing a SIGSEGV/SIGBUS handler and poking every page ...


  parent reply	other threads:[~2011-03-07 11:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-06 12:42 [Bug pch/48004] New: " wbrana at gmail dot com
2011-03-06 21:07 ` [Bug pch/48004] " pinskia at gcc dot gnu.org
2011-03-06 21:11 ` wbrana at gmail dot com
2011-03-07 10:24 ` rguenth at gcc dot gnu.org
2011-03-07 10:54 ` wbrana at gmail dot com
2011-03-07 11:07 ` rguenth at gcc dot gnu.org [this message]
2011-03-07 11:21 ` wbrana at gmail dot com
2011-03-07 12:35 ` wbrana at gmail dot com
2012-07-19 18:57 ` wbrana at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-48004-4-4iJP7qzZNt@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).