Please sign in to comment.
Fix MCJIT issues
All of our problem were related to naming. Most notably: The jlcall wrapper: Since they are in the same module as the original function, LLVM will prevent name collision as appropriate, by doing it's own uniquing, e.g. julia_foo1, becomes julia_foo12, however, if we're not careful, 11 functions later things go BOOM Not resetting global unique: When I originally wrote this code, precompilation did not exists, and I failed to take into account the fact that the symbol from the generated functions will be visible in the new process (llvm dlsyms all loaded modules including the system image). Thus if you have just the right combination of function and globalUnique, you'll run into the system image. Both of these issues cause the wrong function to be executed at run time, with the corresponding chaos. Note that this was never an issue during system image building, because we emit everything into the shadow module where LLVM will take care of it. I also added a unqiue to the julia_gv global variables. This isn't strictly nessecary from a correctness point of view, but it helps when looking at IR dumps from several modules. Also, those linalg tests take forever...
- Loading branch information...
Showing with 23 additions and 5 deletions.