This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/15688] Accessing globals in DSO or PIE results in read faults


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]