public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "jistone at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug translator/15688] Accessing globals in DSO or PIE results in read faults
Date: Thu, 27 Jun 2013 22:17:00 -0000	[thread overview]
Message-ID: <bug-15688-6586-Nj8GKGyzr9@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-15688-6586@http.sourceware.org/bugzilla/>

http://sourceware.org/bugzilla/show_bug.cgi?id=15688

--- Comment #3 from Josh Stone <jistone at redhat dot com> ---
(In reply to Josh Stone from comment #1)
> dwflpp::emit_address already calls enable_task_finder for cases which use
> _stp_umodule_relocate, but it may be more specific to its needs to call
> enable_vma_tracker.

I tried this suggestion with your testcase, and it did the trick.  I think it
will also make this hack from parse_cmdline unnecessary:

  // PR10228: trigger vma tracker logic early if -d /USER-MODULE/
  // given. XXX This is actually too early. Having a user module
  // is a good indicator that something will need vma tracking.
  // But it is not 100%, this really should only trigger through
  // a user mode tapset /* pragma:vma */ or a probe doing a
  // variable lookup through a dynamic module.
  if (mpath[0] == '/')
    enable_vma_tracker (*this);

... because we already have pragma:vma, and I believe my suggestion addresses
the variable lookup.  I think this will also make it so the @var patch doesn't
need to manually enable_vma_tracker(), since dwflpp can enable it as needed.

Another way to handle this is to let dwflpp::emit_address() just insert a
pragma:vma in the generated code.  This will allow the optimizer a chance to
remove unused references before the vma is actually enabled.  We can hopefully
get to a state where the only place calling enable_vma_tracker() is
embeddedcode_info::visit_embeddedcode(), based on pragma:vma.

-- 
You are receiving this mail because:
You are the assignee for the bug.

  parent reply	other threads:[~2013-06-27 22:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27  2:02 [Bug translator/15688] New: " agentzh at gmail dot com
2013-06-27 16:05 ` [Bug translator/15688] " jistone at redhat dot com
2013-06-27 19:37 ` agentzh at gmail dot com
2013-06-27 22:17 ` jistone at redhat dot com [this message]
2013-06-27 22:51 ` jistone at redhat 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-15688-6586-Nj8GKGyzr9@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sourceware.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).