Closed mkitti closed 4 years ago
indentation: I will check my Atom / Juno settings. I suspect it introduced an actual tab.
I'm not sure that the assertion is only needed in jvm.jl. It may also be needed for jcall and other functions. For example, if the JVM is started from a programfile by a file like in the tests, jcall would still silently fail at the REPL Julia prompt by returning an incorrect value.
Do you have a recommendation for another file that is included first?
This pull request creates new assertions for
JavaCall.init
andJavaCall.destroy
which will throw an error if JULIA_COPY_STACKS is not set and the currentTask
is not the rootTask
.Without JULIA_COPY_STACKS=yes,
JavaCall.init
would result in a segmentation fault for me. With the added assertion, I just get an error message now from which the Julia REPL can recover.The assertion could be expanded for use with the other exported calls such as
jcall
. Currently trying to execute those from the REPL just results in a wrong return value than a segmentation fault.