Matt Godbolt via llvm-dev
2016-Sep-30 19:13 UTC
[llvm-dev] Bug in 3.9.0 RTDyldMemoryManager.cpp
Hi folks,
I'm still using MCJIT (I know, I know), and I spotted a crash in exception
handling when I moved from llvm 3.8 to llvm 3.9. I traced it back to EH
frames not being deregistered due to a (typo?) mistake in
RTDyldMemoryManager.cpp:
void deregisterEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size)
override {
* registerEHFramesInProcess(Addr, Size);*
}
..I overrode the function to call deregister instead of register in my own
MemMgr and all's now well.
The crash manifests itself as a seg fault when a process causes an
exception after JITted code has been removed.
Cheers,
Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20160930/436e5316/attachment.html>
Lang Hames via llvm-dev
2016-Oct-03 17:44 UTC
[llvm-dev] Bug in 3.9.0 RTDyldMemoryManager.cpp
Hi Matt, Thanks very much for catching this. I've fixed it in r283123. Cheers, Lang. On Fri, Sep 30, 2016 at 12:13 PM, Matt Godbolt via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi folks, > > I'm still using MCJIT (I know, I know), and I spotted a crash in exception > handling when I moved from llvm 3.8 to llvm 3.9. I traced it back to EH > frames not being deregistered due to a (typo?) mistake in > RTDyldMemoryManager.cpp: > > void deregisterEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) > override { > * registerEHFramesInProcess(Addr, Size);* > } > > ..I overrode the function to call deregister instead of register in my own > MemMgr and all's now well. > > The crash manifests itself as a seg fault when a process causes an > exception after JITted code has been removed. > > Cheers, > > Matt > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161003/cd2ab7f6/attachment.html>
Matt Godbolt via llvm-dev
2016-Oct-04 12:29 UTC
[llvm-dev] Bug in 3.9.0 RTDyldMemoryManager.cpp
Sweet! Took me a few hours of head-scratching: I'm glad we can save someone
else the debugging :)
On Mon, Oct 3, 2016 at 12:44 PM Lang Hames <lhames at gmail.com> wrote:
Hi Matt,
Thanks very much for catching this. I've fixed it in r283123.
Cheers,
Lang.
On Fri, Sep 30, 2016 at 12:13 PM, Matt Godbolt via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
Hi folks,
I'm still using MCJIT (I know, I know), and I spotted a crash in exception
handling when I moved from llvm 3.8 to llvm 3.9. I traced it back to EH
frames not being deregistered due to a (typo?) mistake in
RTDyldMemoryManager.cpp:
void deregisterEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size)
override {
* registerEHFramesInProcess(Addr, Size);*
}
..I overrode the function to call deregister instead of register in my own
MemMgr and all's now well.
The crash manifests itself as a seg fault when a process causes an
exception after JITted code has been removed.
Cheers,
Matt
_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20161004/78a81618/attachment.html>
Possibly Parallel Threads
- suggested bug fix in RTDyldObjectLinkingLayer
- ORC and MCJIT clients: Heads up, API breaking changes in the pipeline.
- [LLVMdev] A weird, reproducable problem with MCJIT
- [LLVMdev] [llvm] r188726 - Adding PIC support for ELF on x86_64 platforms
- ORC and MCJIT clients: Heads up, API breaking changes in the pipeline.