Skip to content

Commit

Permalink
Fix #10865, Windows julia segfaulting without sys.dll
Browse files Browse the repository at this point in the history
also test this on appveyor
  • Loading branch information
tkelman committed Apr 18, 2015
1 parent c384fce commit 52f0cf6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ build_script:

test_script:
- usr\bin\julia -e "versioninfo()"
- copy usr\lib\julia\sys.ji local.ji && usr\bin\julia -J local.ji -e "true" && del local.ji
- cd test && ..\usr\bin\julia runtests.jl all
4 changes: 4 additions & 0 deletions src/dlload.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,12 @@ static uv_lib_t *jl_load_dynamic_library_(const char *modname, unsigned flags, i
snprintf(path, PATHBUF, "%s%s%s", dl_path, modname, ext);
else
snprintf(path, PATHBUF, "%s" PATHSEPSTRING "%s%s", dl_path, modname, ext);
#ifndef _OS_WINDOWS_
if (handle->errmsg) {
free(handle->errmsg);
handle->errmsg = NULL;
}
#endif
error = jl_uv_dlopen(path, handle, flags);
if (!error) goto done;
}
Expand All @@ -136,10 +138,12 @@ static uv_lib_t *jl_load_dynamic_library_(const char *modname, unsigned flags, i
handle->handle = NULL;
/* try loading from standard library path */
snprintf(path, PATHBUF, "%s%s", modname, ext);
#ifndef _OS_WINDOWS_
if (handle->errmsg) {
free(handle->errmsg);
handle->errmsg = NULL;
}
#endif
error = jl_uv_dlopen(path, handle, flags);
if (!error) goto done;
}
Expand Down

0 comments on commit 52f0cf6

Please sign in to comment.