all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: "Stephen J. Turnbull" <stephen@xemacs.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>, emacs-devel@gnu.org
Subject: Re: VIRT_ADDR_VARIES
Date: Wed, 09 Nov 2011 21:40:10 -0800	[thread overview]
Message-ID: <4EBB63BA.9020306@cs.ucla.edu> (raw)
In-Reply-To: <87r51gmxlb.fsf@uwakimon.sk.tsukuba.ac.jp>

On 11/09/11 20:05, Stephen J. Turnbull wrote:
> We don't live in a traditional world anymore.  We have SELinux,...

Yes, of course, but the question isn't whether we
have non-traditional layouts -- of course we have them.
The question is: on what type of platform is VIRT_ADDR_VARIES
correctly unset (i.e., the traditional model is good enough
for Emacs), but this approach breaks down when running under
valgrind?

Let me try to state the issue more concretely.
I don't observe the problem on my host (Fedora 15 x86-64),
even though it has address space randomization.
If I run these two shell commands:

         ./temacs --batch --eval '(progn (insert-file "/proc/self/maps") (message "%s\n" (buffer-string)))'

valgrind ./temacs --batch --eval '(progn (insert-file "/proc/self/maps") (message "%s\n" (buffer-string)))'

I get quite different outputs, but the text, data, and bss
segments are laid out identically in both cases, and they're
always laid out before the heap.  That is, the output looks
like this both times:

  00400000-00634000 r-xp 00000000 09:02 106972830                          .../src/temacs
  00834000-00adc000 rw-p 00234000 09:02 106972830                          .../src/temacs
  00adc000-00b63000 rw-p 00000000 00:00 0
  [...everything else...]

Here the first line is text, the second data, the third bss.
Because the heap is after the data in both cases,
Emacs works in both cases, and there's no need to define
VIRT_ADDR_VARIES, regardless of whether valgrind is used.

Can someone run those two commands on a GNU/Linux host where valgrind
breaks things, and use the output to explain why the breakage
occurs?  That might help explain the issue better.



  reply	other threads:[~2011-11-10  5:40 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-06 17:18 VIRT_ADDR_VARIES Andreas Schwab
2011-11-07  1:50 ` VIRT_ADDR_VARIES Paul Eggert
2011-11-07  8:38   ` VIRT_ADDR_VARIES Andreas Schwab
2011-11-07 23:23     ` VIRT_ADDR_VARIES Paul Eggert
2011-11-08  8:56       ` VIRT_ADDR_VARIES Andreas Schwab
2011-11-08 17:34         ` VIRT_ADDR_VARIES Paul Eggert
2011-11-08 18:38           ` VIRT_ADDR_VARIES Andreas Schwab
2011-11-08 21:17             ` VIRT_ADDR_VARIES Paul Eggert
2011-11-08 22:06               ` VIRT_ADDR_VARIES Andreas Schwab
2011-11-09 17:44                 ` VIRT_ADDR_VARIES Paul Eggert
2011-11-09 21:32                   ` VIRT_ADDR_VARIES Andreas Schwab
2011-11-10  8:17                     ` VIRT_ADDR_VARIES Paul Eggert
2011-11-10  9:29                       ` VIRT_ADDR_VARIES Andreas Schwab
2011-11-10 16:19                         ` VIRT_ADDR_VARIES Paul Eggert
2011-11-10 11:06                       ` VIRT_ADDR_VARIES Eli Zaretskii
2011-11-10 11:20                         ` VIRT_ADDR_VARIES Andreas Schwab
2011-11-10 16:29                         ` VIRT_ADDR_VARIES Paul Eggert
2011-11-10 16:43                           ` VIRT_ADDR_VARIES Eli Zaretskii
2011-11-10 16:50                             ` VIRT_ADDR_VARIES Paul Eggert
2011-11-10 18:06                               ` VIRT_ADDR_VARIES Eli Zaretskii
2011-11-14  4:57                       ` VIRT_ADDR_VARIES Paul Eggert
2011-11-10  4:05                   ` VIRT_ADDR_VARIES Stephen J. Turnbull
2011-11-10  5:40                     ` Paul Eggert [this message]
2011-11-10 17:05                       ` VIRT_ADDR_VARIES Andreas Schwab
2011-11-10 17:15                         ` VIRT_ADDR_VARIES Paul Eggert

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=4EBB63BA.9020306@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=schwab@linux-m68k.org \
    --cc=stephen@xemacs.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.