diff --git a/base/interactiveutil.jl b/base/interactiveutil.jl index 1d569265a3773..12663bb92363a 100644 --- a/base/interactiveutil.jl +++ b/base/interactiveutil.jl @@ -61,9 +61,10 @@ function edit(path::AbstractString, line::Integer=0) end if is_windows() && name == "open" - systemerror(:edit, ccall((:ShellExecuteW,"shell32"), stdcall, Int, - (Ptr{Void}, Cwstring, Cwstring, Ptr{Void}, Ptr{Void}, Cint), - C_NULL, "open", path, C_NULL, C_NULL, 10) ≤ 32) + @static is_windows() && # don't emit this ccall on other platforms + systemerror(:edit, ccall((:ShellExecuteW, "shell32"), stdcall, Int, + (Ptr{Void}, Cwstring, Cwstring, Ptr{Void}, Ptr{Void}, Cint), + C_NULL, "open", path, C_NULL, C_NULL, 10) ≤ 32) elseif background spawn(pipeline(cmd, stderr=STDERR)) else diff --git a/src/dump.c b/src/dump.c index 08e31148a9163..3df2965305ed6 100644 --- a/src/dump.c +++ b/src/dump.c @@ -422,7 +422,15 @@ static void jl_update_all_fptrs(void) { //jl_printf(JL_STDOUT, "delayed_fptrs_n: %d\n", delayed_fptrs_n); void **fvars = sysimg_fvars; - if (fvars == 0) return; + if (fvars == NULL) { + size_t i; + for (i = 0; i < delayed_fptrs_n; i++) { + jl_method_instance_t *li = delayed_fptrs[i].li; + assert(li->jlcall_api && li->jlcall_api != 2); + li->jlcall_api = 0; + } + return; + } // jl_fptr_to_llvm needs to decompress some ASTs, therefore this needs to be NULL // to skip trying to restore GlobalVariable pointers in jl_deserialize_gv sysimg_gvars = NULL; @@ -431,7 +439,7 @@ static void jl_update_all_fptrs(void) jl_method_instance_t **linfos = (jl_method_instance_t**)malloc(sizeof(jl_method_instance_t*) * sysimg_fvars_max); for (i = 0; i < delayed_fptrs_n; i++) { jl_method_instance_t *li = delayed_fptrs[i].li; - assert(li->def); + assert(li->def && li->jlcall_api && li->jlcall_api != 2); int32_t cfunc = delayed_fptrs[i].cfunc - 1; if (cfunc >= 0) { jl_fptr_to_llvm((jl_fptr_t)fvars[cfunc], li, 1);