diff options
author | Zoltan Varga <vargaz@gmail.com> | 2016-10-26 19:41:53 +0300 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2016-10-26 21:09:58 +0300 |
commit | 8b8d4c41d2dd60ad4db5e046845145ac3818a9d5 (patch) | |
tree | 5f20a2197f9f67f1e526ce5e796f6e27c339a3e0 | |
parent | 8864f4c6e92c921f1069f29c355bb4a40d60e964 (diff) |
[llvm] Use the global llvm context instead of creating a new one for each aot module, since the latter seems to cause random memory corruption/crashes.
-rw-r--r-- | mono/mini/mini-llvm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mono/mini/mini-llvm.c b/mono/mini/mini-llvm.c index a21c10fd782..b83c823acfb 100644 --- a/mono/mini/mini-llvm.c +++ b/mono/mini/mini-llvm.c @@ -8366,7 +8366,7 @@ mono_llvm_create_aot_module (MonoAssembly *assembly, const char *global_prefix, module->llvm_only = llvm_only; /* The first few entries are reserved */ module->max_got_offset = 16; - module->context = LLVMContextCreate (); + module->context = LLVMGetGlobalContext (); if (llvm_only) /* clang ignores our debug info because it has an invalid version */ |