[llvm-bugs] [Bug 31380] New: JIT notifiers called before relocations performed (and pages marked executable)
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)
Assignee: unassignedbugs at nondot.org
Reporter: andres at anarazel.de
CC: llvm-bugs at lists.llvm.org
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...
More information about the llvm-bugs