This is an archive of the discontinued LLVM Phabricator instance.

[XRay][compiler-rt] Return the pointer associated with the function instead of the sled
ClosedPublic

Authored by dberris on Aug 27 2017, 8:35 PM.

Details

Summary

XRay has erroneously been returning the address of the first sled in the
instrumentation map for a function id instead of the (runtime-relocated)
functison address. This causes confusion and issues for applications
where:

  • The first sled in the function may not be an entry sled (due to re-ordering or some other reason).
  • The caller attempts to find a symbol associated with the pointer at runtime, because the sled may not be exactly where the function's known address is (in case of inlined functions or those that have an external definition for symbols).

This fixes http://llvm.org/PR34340.

Event Timeline

dberris created this revision.Aug 27 2017, 8:35 PM
eizan accepted this revision.Aug 27 2017, 8:41 PM
This revision is now accepted and ready to land.Aug 27 2017, 8:41 PM
This revision was automatically updated to reflect the committed changes.