[llvm-bugs] [Bug 31380] New: JIT notifiers called before relocations performed (and pages marked executable)

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Dec 14 15:29:12 PST 2016


            Bug ID: 31380
           Summary: JIT notifiers called before relocations performed (and
                    pages marked executable)
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: MCJIT
          Assignee: unassignedbugs at nondot.org
          Reporter: andres at anarazel.de
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified


Currently the jit notifier's NotifyObjectEmitted() is called by
MCJIT::generateCodeForModule(). That's too early, because relocations haven't
been performed (making the code debuggers/profiling tools see wrong) and
because the page hasn't yet been marked executable (bad, because some profiling
tools don't work in that case).

It seems to me that generateCodeForModule() should put all notifications into a
queue of pending notifications which then is emitted in
finalizeLoadedModules(), after Dyld.resolveRelocations() and

Are there reasons for the current placement that I missed, or is this just an
omission? In the latter case I'll happily provide a patch fixing this.



You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161214/d0d2a824/attachment.html>

More information about the llvm-bugs mailing list