public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug pch/48004] New: doesn't work with randomize_va_space
@ 2011-03-06 12:42 wbrana at gmail dot com
  2011-03-06 21:07 ` [Bug pch/48004] " pinskia at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: wbrana at gmail dot com @ 2011-03-06 12:42 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: doesn't work with randomize_va_space
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: pch
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: wbrana@gmail.com


If address space randomization is enabled
echo 1 > /proc/sys/kernel/randomize_va_space
pch isn't used - warning: had text segment at different address


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug pch/48004] doesn't work with randomize_va_space
  2011-03-06 12:42 [Bug pch/48004] New: doesn't work with randomize_va_space wbrana at gmail dot com
@ 2011-03-06 21:07 ` pinskia at gcc dot gnu.org
  2011-03-06 21:11 ` wbrana at gmail dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-03-06 21:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-03-06 21:07:04 UTC ---
Which host is this on?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug pch/48004] doesn't work with randomize_va_space
  2011-03-06 12:42 [Bug pch/48004] New: doesn't work with randomize_va_space 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
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: wbrana at gmail dot com @ 2011-03-06 21:11 UTC (permalink / raw)
  To: gcc-bugs

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

wbrana <wbrana at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
               Host|                            |x86_64-pc-linux-gnu

--- Comment #2 from wbrana <wbrana at gmail dot com> 2011-03-06 21:11:50 UTC ---
x86_64-pc-linux-gnu


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug pch/48004] doesn't work with randomize_va_space
  2011-03-06 12:42 [Bug pch/48004] New: doesn't work with randomize_va_space 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
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-07 10:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2011.03.07 10:24:39
     Ever Confirmed|0                           |1

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-07 10:24:39 UTC ---
It should work, we use fixed mappings for this.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug pch/48004] doesn't work with randomize_va_space
  2011-03-06 12:42 [Bug pch/48004] New: doesn't work with randomize_va_space wbrana at gmail dot com
                   ` (2 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: wbrana at gmail dot com @ 2011-03-07 10:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from wbrana <wbrana at gmail dot com> 2011-03-07 10:54:43 UTC ---
It is possible that this bug is related to PaX, which I'm using
http://bugs.gentoo.org/show_bug.cgi?id=301299#c31
I tried to disable PaX with "paxctl -pemrxs cc1plus", but warning disappear
only if randomize_va_space is 0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug pch/48004] doesn't work with randomize_va_space
  2011-03-06 12:42 [Bug pch/48004] New: doesn't work with randomize_va_space wbrana at gmail dot com
                   ` (3 preceding siblings ...)
  2011-03-07 10:54 ` wbrana at gmail dot com
@ 2011-03-07 11:07 ` rguenth at gcc dot gnu.org
  2011-03-07 11:21 ` wbrana at gmail dot com
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-07 11:07 UTC (permalink / raw)
  To: gcc-bugs

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 ...


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug pch/48004] doesn't work with randomize_va_space
  2011-03-06 12:42 [Bug pch/48004] New: doesn't work with randomize_va_space wbrana at gmail dot com
                   ` (4 preceding siblings ...)
  2011-03-07 11:07 ` rguenth at gcc dot gnu.org
@ 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
  7 siblings, 0 replies; 9+ messages in thread
From: wbrana at gmail dot com @ 2011-03-07 11:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from wbrana <wbrana at gmail dot com> 2011-03-07 11:20:55 UTC ---
I can see warning also when PaX is disabled with kernel 2.6.37.2
randomize_va_space is 1 by default.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug pch/48004] doesn't work with randomize_va_space
  2011-03-06 12:42 [Bug pch/48004] New: doesn't work with randomize_va_space wbrana at gmail dot com
                   ` (5 preceding siblings ...)
  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
  7 siblings, 0 replies; 9+ messages in thread
From: wbrana at gmail dot com @ 2011-03-07 12:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from wbrana <wbrana at gmail dot com> 2011-03-07 12:35:23 UTC ---
Parsing /proc doesn't have to work with PaX kernel. 
PaX removes some info from e.g. maps file.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug pch/48004] doesn't work with randomize_va_space
  2011-03-06 12:42 [Bug pch/48004] New: doesn't work with randomize_va_space wbrana at gmail dot com
                   ` (6 preceding siblings ...)
  2011-03-07 12:35 ` wbrana at gmail dot com
@ 2012-07-19 18:57 ` wbrana at gmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: wbrana at gmail dot com @ 2012-07-19 18:57 UTC (permalink / raw)
  To: gcc-bugs

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

wbrana <wbrana at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #8 from wbrana <wbrana at gmail dot com> 2012-07-19 18:57:26 UTC ---
I have tested GCC 4.5.4 and 4.7.1. It seems to be fixed.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-07-19 18:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-06 12:42 [Bug pch/48004] New: doesn't work with randomize_va_space 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
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

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).