Skip to content

Commit

Permalink
fix #31686, segfault on invalid cmdline option (#31689)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson authored and Keno committed Apr 11, 2019
1 parent ccd9574 commit 5ce94d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ static void jl_close_item_atexit(uv_handle_t *handle)

JL_DLLEXPORT void jl_atexit_hook(int exitcode)
{
if (jl_all_tls_states == NULL)
return;

jl_ptls_t ptls = jl_get_ptls_states();

if (exitcode == 0)
Expand Down
5 changes: 4 additions & 1 deletion test/cmdlineargs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ let exename = `$(Base.julia_cmd()) --startup-file=no`
# --procs
@test readchomp(`$exename -q -p 2 -e "println(nworkers())"`) == "2"
@test !success(`$exename -p 0`)
@test !success(`$exename --procs=1.0`)
let p = run(`$exename --procs=1.0`, wait=false)
wait(p)
@test p.exitcode == 1 && p.termsignal == 0
end

# --machine-file
# this does not check that machine file works,
Expand Down

2 comments on commit 5ce94d8

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan

Please sign in to comment.