I have come across the issue where repeatedly creating and deleting an interpreter can cause incorrect external functions to be called. The issue had to do with the ManagedStatic map Functions in ExecutionEngine/Interpreter/ExternalFunctions.cpp. I was able to fix this by calling llvm_shutdown() when I delete the interpreter. Is it necessary to delete all ManagedStatic objects to delete and recreate an Interpreter? Would it not be better to clear the Functions map in the Interpreter desctructor since it data in it may no longer be valid? -David Bertouille
On Jul 1, 2009, at 8:28 AM, David Bertouille wrote:> Would it not be better to clear the Functions > map in the Interpreter desctructor since it data in it may no longer > be > valid?Probably. Patches welcome! --Owen -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2620 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090701/e5248ef4/attachment.bin>
Here is a proposed patch to clear the function cache on destruction of an interpreter. --Dave Owen Anderson wrote:> On Jul 1, 2009, at 8:28 AM, David Bertouille wrote: >> Would it not be better to clear the Functions >> map in the Interpreter desctructor since it data in it may no longer be >> valid? > > > Probably. Patches welcome! > > --Owen > ------------------------------------------------------------------------ > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > > __________ NOD32 4184 (20090624) Information __________ > > This message was checked by NOD32 antivirus system. > http://www.eset.com >-------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Interpreter.diff URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090701/812feb95/attachment.ksh>