Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

static maps preclude multiple interpreter instances #21962

Open Quuxplusone opened 9 years ago

Quuxplusone commented 9 years ago
Bugzilla Link PR21963
Status NEW
Importance P normal
Reported by Lodewijk Vöge (lvoege+llvm@gmail.com)
Reported on 2014-12-18 12:15:08 -0800
Last modified on 2014-12-18 12:15:08 -0800
Version trunk
Hardware All All
CC llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments d (7382 bytes, application/octet-stream)
Blocks
Blocked by
See also
Created attachment 13573
patch

the Interpreter class looks up external functions with a static map, keyed on
Function *. this makes it impossible to reliably have multiple Interpreter
instances in the same process. when I expose some callback to one instance, do
my thing and tear it all down, then expose some other callback to another
instance that just happens to get the same Function pointer as the earlier one,
hilarity ensues.

this is not a problem if those maps are in the Interpreter instance. patch
attached.
Quuxplusone commented 9 years ago

Attached d (7382 bytes, application/octet-stream): patch