Skip to content

WIP: Backports for 1.0.5 #33075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 37 commits into from
Aug 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
1788b07
fix #14574, `cp` on files >2GB (#30989)
JeffBezanson Feb 10, 2019
da925f3
avoid assertion due to overflow if Num is negative
vchuravy Feb 18, 2019
21dc4aa
Recover meta nodes in replace_code_newstyle (#31871)
nlw0 Apr 30, 2019
2df447c
Unconditionally append lib/julia to rpath, fixes #31903. (#31933)
fredrikekre May 6, 2019
5e6e52e
Fix optind in getopt on musl libc. On exit optind
fredrikekre May 6, 2019
636fe96
Update Mozilla CA certificate store to latest (05-15-2019) for libgit…
mikhail-j May 15, 2019
04ff9e5
fix `isa` fast path for typevars with lower bounds (#32040)
JeffBezanson May 16, 2019
6b4cb65
Show correct format documentation (#31484)
omus May 23, 2019
0a06275
Amend matrix * vector specialization for strided arrays (#32097)
ararslan May 23, 2019
dbbf35c
Add a test for PR 32097 (#32124)
ararslan May 23, 2019
c1cfdcb
Fully qualify at-everywhere, fixes #28966. (#32144)
fredrikekre May 26, 2019
06a7801
fix LibGit2 test: unknown repo now returns ERROR instead of EAUTH (#3…
JeffBezanson Jun 3, 2019
e6b0703
relax some Diagonal tests from #31443 (#32162)
dkarrasch Jun 6, 2019
3510c41
readdlm(bytearray) shouldn't modify bytearray (#32255)
stevengj Jun 8, 2019
0b76f21
fixes for getindex tab-completion (#31499)
stevengj Jun 15, 2019
9faf3cf
bugfix for ldiv!(D::Diagonal, B::StridedVecOrMat) and tests (#32104)
dkarrasch Jun 18, 2019
97d6c9d
Fix tryparse for invalid Chars (#32351)
c42f Jun 20, 2019
297bb68
Add missing test dependency on Random to Statistics (#32383)
ararslan Jun 22, 2019
60b1fea
Fix element type of -Symmetric(A) for e.g. Bool or JuMP.VariableRef,…
blegat Jun 26, 2019
c6d0356
codegen,tbaa: fix array isassigned tbaa information (#32356)
vtjnash Jun 26, 2019
5497aec
Fix Distributed.head_and_tail (#32431)
mortenpi Jun 27, 2019
ee96a1c
bug fixed in read_to_buffer (#32457)
Jul 3, 2019
95f4f69
Fix #32579 - Issue in typeconstraint accumulation (#32605)
Keno Jul 17, 2019
31227f9
[Statistics] fix type determination in corm (#32271)
dkarrasch Jul 24, 2019
d99e79f
fix generic ldiv! for CholeskyPivoted (#32593)
dkarrasch Jul 26, 2019
1005051
Implement isdiag(::Bidiagonal), add tests (#32694)
garrison Jul 30, 2019
be954d4
fix test for sparse matrix assignment (#32756)
dkarrasch Aug 1, 2019
4dc49d8
fix #32121, macro hygiene bug in named tuples
JeffBezanson May 24, 2019
36ba4f3
another improvement to closure analysis precision (#30972)
JeffBezanson Feb 7, 2019
375fc8b
avoid file ownership requirement in touch (#28819)
tanmaykm Sep 28, 2018
736f10a
Fix makefile not removing libjulia-debugon windows (#30059)
musm Dec 8, 2018
4b759a1
Add Float16 comparisons (#29916)
sam0410 Dec 13, 2018
7ea7222
stdlib/SparseArrays: fix scalar setindex! for vector eltype (#29331)
stev47 Dec 19, 2018
f056e29
proper diagonal in copytri! (fix #30055) (#30066)
KlausC Jan 8, 2019
5c8d8f6
Fix incorrect sign of atanh(complex(x,y)) if x == -1 (#31061)
cafaxo Feb 19, 2019
944f84c
Allow both EAUTH and ERROR for bad credential test in LibGit2 tests. …
fredrikekre Jun 9, 2019
b717256
fix the fix for #32121, more named tuple macro hygiene (#32464)
JeffBezanson Jul 2, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -967,10 +967,7 @@ else ifeq ($(OS), Darwin)
RPATH_ESCAPED_ORIGIN := $(RPATH_ORIGIN)
RPATH_LIB := -Wl,-rpath,'@loader_path/julia/' -Wl,-rpath,'@loader_path/'
else
RPATH := -Wl,-rpath,'$$ORIGIN/$(build_libdir_rel)' -Wl,-rpath-link,$(build_shlibdir) -Wl,-z,origin
ifeq ($(OS), FreeBSD)
RPATH += -Wl,-rpath,'$$ORIGIN/$(build_private_libdir_rel)'
endif
RPATH := -Wl,-rpath,'$$ORIGIN/$(build_libdir_rel)' -Wl,-rpath,'$$ORIGIN/$(build_private_libdir_rel)' -Wl,-rpath-link,$(build_shlibdir) -Wl,-z,origin
RPATH_ORIGIN := -Wl,-rpath,'$$ORIGIN' -Wl,-z,origin
RPATH_ESCAPED_ORIGIN := -Wl,-rpath,'\$$\$$ORIGIN' -Wl,-z,origin -Wl,-rpath-link,$(build_shlibdir)
RPATH_LIB := -Wl,-rpath,'$$ORIGIN/julia' -Wl,-rpath,'$$ORIGIN' -Wl,-z,origin
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,10 @@ ifeq ($(BUNDLE_DEBUG_LIBS),1)
$(INSTALL_M) $(build_bindir)/julia-debug $(DESTDIR)$(bindir)/
endif
ifeq ($(OS),WINNT)
-$(INSTALL_M) $(build_bindir)/*.dll $(DESTDIR)$(bindir)/
-$(INSTALL_M) $(filter-out $(build_bindir)/libjulia-debug.dll,$(wildcard $(build_bindir)/*.dll)) $(DESTDIR)$(bindir)/
-$(INSTALL_M) $(build_libdir)/libjulia.dll.a $(DESTDIR)$(libdir)/
ifeq ($(BUNDLE_DEBUG_LIBS),1)
-$(INSTALL_M) $(build_bindir)/libjulia-debug.dll $(DESTDIR)$(bindir)/
-$(INSTALL_M) $(build_libdir)/libjulia-debug.dll.a $(DESTDIR)$(libdir)/
endif
-$(INSTALL_M) $(build_bindir)/libopenlibm.dll.a $(DESTDIR)$(libdir)/
Expand Down
6 changes: 6 additions & 0 deletions base/compiler/ssair/legacy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ function replace_code_newstyle!(ci::CodeInfo, ir::IRCode, nargs::Int)
ci.linetable = ir.linetable
ci.ssavaluetypes = ir.types
ci.ssaflags = ir.flags
for metanode in ir.meta
push!(ci.code, metanode)
push!(ci.codelocs, 1)
push!(ci.ssavaluetypes, Any)
push!(ci.ssaflags, 0x00)
end
# Translate BB Edges to statement edges
# (and undo normalization for now)
for i = 1:length(ci.code)
Expand Down
12 changes: 9 additions & 3 deletions base/compiler/ssair/passes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function walk_to_defs(compact::IncrementalCompact, @nospecialize(defssa), @nospe
found_def = false
## Track which PhiNodes, SSAValue intermediaries
## we forwarded through.
visited = IdSet{Any}()
visited = IdDict{Any, Any}()
worklist_defs = Any[]
worklist_constraints = Any[]
leaves = Any[]
Expand All @@ -183,7 +183,7 @@ function walk_to_defs(compact::IncrementalCompact, @nospecialize(defssa), @nospe
while !isempty(worklist_defs)
defssa = pop!(worklist_defs)
typeconstraint = pop!(worklist_constraints)
push!(visited, defssa)
visited[defssa] = typeconstraint
def = compact[defssa]
if isa(def, PhiNode)
push!(visited_phinodes, defssa)
Expand All @@ -207,9 +207,15 @@ function walk_to_defs(compact::IncrementalCompact, @nospecialize(defssa), @nospe
if isa(val, AnySSAValue)
new_def, new_constraint = simple_walk_constraint(compact, val, typeconstraint)
if isa(new_def, AnySSAValue)
if !(new_def in visited)
if !haskey(visited, new_def)
push!(worklist_defs, new_def)
push!(worklist_constraints, new_constraint)
elseif !(new_constraint <: visited[new_def])
# We have reached the same definition via a different
# path, with a different type constraint. We may have
# to redo some work here with the wider typeconstraint
push!(worklist_defs, new_def)
push!(worklist_constraints, tmerge(new_constraint, visited[new_def]))
end
continue
end
Expand Down
12 changes: 8 additions & 4 deletions base/complex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -917,10 +917,14 @@ function atanh(z::Complex{T}) where T<:AbstractFloat
return Complex(copysign(zero(x),x), copysign(oftype(y,pi)/2, y))
end
return Complex(real(1/z), copysign(oftype(y,pi)/2, y))
elseif ax==1
end
β = copysign(one(T), x)
z *= β
x, y = reim(z)
if x == 1
if y == 0
ξ = copysign(oftype(x,Inf),x)
η = zero(y)
ξ = oftype(x, Inf)
η = y
else
ym = ay+ρ
ξ = log(sqrt(sqrt(4+y*y))/sqrt(ym))
Expand All @@ -935,7 +939,7 @@ function atanh(z::Complex{T}) where T<:AbstractFloat
end
η = angle(Complex((1-x)*(1+x)-ysq, 2y))/2
end
Complex(ξ, η)
β * Complex(ξ, η)
end
atanh(z::Complex) = atanh(float(z))

Expand Down
9 changes: 7 additions & 2 deletions base/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,13 @@ We can see the [`mtime`](@ref) has been modified by `touch`.
function touch(path::AbstractString)
f = open(path, JL_O_WRONLY | JL_O_CREAT, 0o0666)
try
t = time()
futime(f,t,t)
if Sys.isunix()
ret = ccall(:futimes, Cint, (Cint, Ptr{Cvoid}), fd(f), C_NULL)
systemerror(:futimes, ret != 0, extrainfo=path)
else
t = time()
futime(f,t,t)
end
finally
close(f)
end
Expand Down
14 changes: 10 additions & 4 deletions base/filesystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,19 @@ function close(f::File)
return nothing
end

# sendfile is the most efficient way to copy a file (or any file descriptor)
# sendfile is the most efficient way to copy from a file descriptor
function sendfile(dst::File, src::File, src_offset::Int64, bytes::Int)
check_open(dst)
check_open(src)
err = ccall(:jl_fs_sendfile, Int32, (OS_HANDLE, OS_HANDLE, Int64, Csize_t),
src.handle, dst.handle, src_offset, bytes)
uv_error("sendfile", err)
while true
result = ccall(:jl_fs_sendfile, Int32, (OS_HANDLE, OS_HANDLE, Int64, Csize_t),
src.handle, dst.handle, src_offset, bytes)
uv_error("sendfile", result)
nsent = result
bytes -= nsent
src_offset += nsent
bytes <= 0 && break
end
nothing
end

Expand Down
17 changes: 10 additions & 7 deletions base/float.jl
Original file line number Diff line number Diff line change
Expand Up @@ -503,15 +503,18 @@ for Ti in (Int64,UInt64,Int128,UInt128)
end
end
end
for op in (:(==), :<, :<=)
@eval begin
($op)(x::Float16, y::Union{Int128,UInt128,Int64,UInt64}) = ($op)(Float64(x), Float64(y))
($op)(x::Union{Int128,UInt128,Int64,UInt64}, y::Float16) = ($op)(Float64(x), Float64(y))

==(x::Float32, y::Union{Int32,UInt32}) = Float64(x)==Float64(y)
==(x::Union{Int32,UInt32}, y::Float32) = Float64(x)==Float64(y)

<(x::Float32, y::Union{Int32,UInt32}) = Float64(x)<Float64(y)
<(x::Union{Int32,UInt32}, y::Float32) = Float64(x)<Float64(y)
($op)(x::Union{Float16,Float32}, y::Union{Int32,UInt32}) = ($op)(Float64(x), Float64(y))
($op)(x::Union{Int32,UInt32}, y::Union{Float16,Float32}) = ($op)(Float64(x), Float64(y))

<=(x::Float32, y::Union{Int32,UInt32}) = Float64(x)<=Float64(y)
<=(x::Union{Int32,UInt32}, y::Float32) = Float64(x)<=Float64(y)
($op)(x::Float16, y::Union{Int16,UInt16}) = ($op)(Float32(x), Float32(y))
($op)(x::Union{Int16,UInt16}, y::Float16) = ($op)(Float32(x), Float32(y))
end
end


abs(x::Float16) = reinterpret(Float16, reinterpret(UInt16, x) & 0x7fff)
Expand Down
6 changes: 4 additions & 2 deletions base/parse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ function tryparse_internal(::Type{T}, s::AbstractString, startpos::Int, endpos::
_Z = UInt32('Z')
_z = UInt32('z')
while n <= m
_c = UInt32(c)
# Fast path from `UInt32(::Char)`; non-ascii will be >= 0x80
_c = reinterpret(UInt32, c) >> 24
d::T = _0 <= _c <= _9 ? _c-_0 :
_A <= _c <= _Z ? _c-_A+ UInt32(10) :
_a <= _c <= _z ? _c-_a+a : base
Expand All @@ -139,7 +140,8 @@ function tryparse_internal(::Type{T}, s::AbstractString, startpos::Int, endpos::
end
(T <: Signed) && (n *= sgn)
while !isspace(c)
_c = UInt32(c)
# Fast path from `UInt32(::Char)`; non-ascii will be >= 0x80
_c = reinterpret(UInt32, c) >> 24
d::T = _0 <= _c <= _9 ? _c-_0 :
_A <= _c <= _Z ? _c-_A+ UInt32(10) :
_a <= _c <= _z ? _c-_a+a : base
Expand Down
2 changes: 1 addition & 1 deletion deps/Versions.make
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ CURL_VER = 7.56.0
# Specify the version of the Mozilla CA Certificate Store to obtain.
# The versions of cacert.pem are identified by the date (YYYY-MM-DD) of their changes.
# See https://curl.haxx.se/docs/caextract.html for more details.
MOZILLA_CACERT_VERSION := 2019-01-23
MOZILLA_CACERT_VERSION := 2019-05-15
1 change: 0 additions & 1 deletion deps/checksums/cacert-2019-01-23.pem/md5

This file was deleted.

1 change: 0 additions & 1 deletion deps/checksums/cacert-2019-01-23.pem/sha512

This file was deleted.

1 change: 1 addition & 0 deletions deps/checksums/cacert-2019-05-15.pem/md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f4a13fcdd32ca18c3e62c7a728ebb378
1 change: 1 addition & 0 deletions deps/checksums/cacert-2019-05-15.pem/sha512
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6dff0130bdc7c9b211d437598d6caf1b5bb7f7268ce66713e9701890f8924c98ab5a4c0df28dac4fdfea439ad61b46861d0c5b2986ac8c8b4a47218a2b9ba02f
8 changes: 4 additions & 4 deletions src/ccall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1808,10 +1808,10 @@ static jl_cgval_t emit_ccall(jl_codectx_t &ctx, jl_value_t **args, size_t nargs)
}
else if (!jl_has_free_typevars(ety)) {
Value *idx = emit_unbox(ctx, T_size, idxv, (jl_value_t*)jl_ulong_type);
Value *arrayptr = emit_bitcast(ctx, emit_arrayptr(ctx, aryv, aryex), T_ppjlvalue);
Value *slot_addr = ctx.builder.CreateGEP(arrayptr, idx);
Value *load = tbaa_decorate(tbaa_arraybuf, ctx.builder.CreateLoad(slot_addr));
Value *res = ctx.builder.CreateZExt(ctx.builder.CreateICmpNE(load, V_null), T_int32);
Value *arrayptr = emit_bitcast(ctx, emit_arrayptr(ctx, aryv, aryex), T_pprjlvalue);
Value *slot_addr = ctx.builder.CreateInBoundsGEP(T_prjlvalue, arrayptr, idx);
Value *load = tbaa_decorate(tbaa_ptrarraybuf, ctx.builder.CreateLoad(T_prjlvalue, slot_addr));
Value *res = ctx.builder.CreateZExt(ctx.builder.CreateICmpNE(load, Constant::getNullValue(T_prjlvalue)), T_int32);
JL_GC_POP();
return mark_or_box_ccall_result(ctx, res, retboxed, rt, unionall, static_rt);
}
Expand Down
39 changes: 25 additions & 14 deletions src/cgutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -779,13 +779,18 @@ static unsigned get_box_tindex(jl_datatype_t *jt, jl_value_t *ut)

static Value *emit_nthptr_addr(jl_codectx_t &ctx, Value *v, ssize_t n, bool gctracked = true)
{
return ctx.builder.CreateInBoundsGEP(emit_bitcast(ctx, maybe_decay_tracked(v), T_pprjlvalue),
ConstantInt::get(T_size, n));
return ctx.builder.CreateInBoundsGEP(
T_prjlvalue,
emit_bitcast(ctx, maybe_decay_tracked(v), T_pprjlvalue),
ConstantInt::get(T_size, n));
}

static Value *emit_nthptr_addr(jl_codectx_t &ctx, Value *v, Value *idx)
{
return ctx.builder.CreateInBoundsGEP(emit_bitcast(ctx, maybe_decay_tracked(v), T_pprjlvalue), idx);
return ctx.builder.CreateInBoundsGEP(
T_prjlvalue,
emit_bitcast(ctx, maybe_decay_tracked(v), T_pprjlvalue),
idx);
}

static Value *emit_nthptr(jl_codectx_t &ctx, Value *v, ssize_t n, MDNode *tbaa)
Expand Down Expand Up @@ -1457,8 +1462,10 @@ static bool emit_getfield_unknownidx(jl_codectx_t &ctx,
minimum_align = std::min(minimum_align,
(size_t)julia_alignment(ft));
}
Value *fldptr = ctx.builder.CreateInBoundsGEP(maybe_decay_tracked(
emit_bitcast(ctx, data_pointer(ctx, strct), T_pprjlvalue)), idx);
Value *fldptr = ctx.builder.CreateInBoundsGEP(
T_prjlvalue,
maybe_decay_tracked(emit_bitcast(ctx, data_pointer(ctx, strct), T_pprjlvalue)),
idx);
Value *fld = tbaa_decorate(strct.tbaa,
maybe_mark_load_dereferenceable(
ctx.builder.CreateLoad(T_prjlvalue, fldptr),
Expand Down Expand Up @@ -1539,8 +1546,9 @@ static jl_cgval_t emit_getfield_knownidx(jl_codectx_t &ctx, const jl_cgval_t &st
// can pessimize mem2reg
if (byte_offset > 0) {
addr = ctx.builder.CreateInBoundsGEP(
emit_bitcast(ctx, staddr, T_pint8),
ConstantInt::get(T_size, byte_offset));
T_int8,
emit_bitcast(ctx, staddr, T_pint8),
ConstantInt::get(T_size, byte_offset));
}
else {
addr = staddr;
Expand Down Expand Up @@ -1896,8 +1904,8 @@ static Value *emit_array_nd_index(
ctx.builder.SetInsertPoint(failBB);
// CreateAlloca is OK here since we are on an error branch
Value *tmp = ctx.builder.CreateAlloca(T_size, ConstantInt::get(T_size, nidxs));
for(size_t k=0; k < nidxs; k++) {
ctx.builder.CreateStore(idxs[k], ctx.builder.CreateInBoundsGEP(tmp, ConstantInt::get(T_size, k)));
for (size_t k = 0; k < nidxs; k++) {
ctx.builder.CreateStore(idxs[k], ctx.builder.CreateInBoundsGEP(T_size, tmp, ConstantInt::get(T_size, k)));
}
ctx.builder.CreateCall(prepare_call(jlboundserrorv_func),
{ mark_callee_rooted(a), tmp, ConstantInt::get(T_size, nidxs) });
Expand Down Expand Up @@ -2410,8 +2418,9 @@ static void emit_setfield(jl_codectx_t &ctx,
Value *addr = data_pointer(ctx, strct);
if (byte_offset > 0) {
addr = ctx.builder.CreateInBoundsGEP(
emit_bitcast(ctx, maybe_decay_tracked(addr), T_pint8),
ConstantInt::get(T_size, byte_offset)); // TODO: use emit_struct_gep
T_int8,
emit_bitcast(ctx, maybe_decay_tracked(addr), T_pint8),
ConstantInt::get(T_size, byte_offset)); // TODO: use emit_struct_gep
}
jl_value_t *jfty = jl_svecref(sty->types, idx0);
if (jl_field_isptr(sty, idx0)) {
Expand Down Expand Up @@ -2531,7 +2540,9 @@ static jl_cgval_t emit_new_struct(jl_codectx_t &ctx, jl_value_t *ty, size_t narg
if (!jl_field_isptr(sty, i) && jl_is_uniontype(jl_field_type(sty, i))) {
tbaa_decorate(tbaa_unionselbyte, ctx.builder.CreateStore(
ConstantInt::get(T_int8, 0),
ctx.builder.CreateInBoundsGEP(emit_bitcast(ctx, strct, T_pint8),
ctx.builder.CreateInBoundsGEP(
T_int8,
emit_bitcast(ctx, strct, T_pint8),
ConstantInt::get(T_size, jl_field_offset(sty, i) + jl_field_size(sty, i) - 1))));
}
}
Expand All @@ -2551,15 +2562,15 @@ static jl_cgval_t emit_new_struct(jl_codectx_t &ctx, jl_value_t *ty, size_t narg
tbaa_decorate(strctinfo.tbaa, ctx.builder.CreateStore(
ConstantPointerNull::get(cast<PointerType>(T_prjlvalue)),
ctx.builder.CreateInBoundsGEP(T_prjlvalue, emit_bitcast(ctx, strct, T_pprjlvalue),
ConstantInt::get(T_size, jl_field_offset(sty, i) / sizeof(void*)))));
ConstantInt::get(T_size, jl_field_offset(sty, i) / sizeof(void*)))));
}
}
for (size_t i = nargs; i < nf; i++) {
if (!jl_field_isptr(sty, i) && jl_is_uniontype(jl_field_type(sty, i))) {
tbaa_decorate(tbaa_unionselbyte, ctx.builder.CreateStore(
ConstantInt::get(T_int8, 0),
ctx.builder.CreateInBoundsGEP(emit_bitcast(ctx, strct, T_pint8),
ConstantInt::get(T_size, jl_field_offset(sty, i) + jl_field_size(sty, i) - 1))));
ConstantInt::get(T_size, jl_field_offset(sty, i) + jl_field_size(sty, i) - 1))));
}
}
bool need_wb = false;
Expand Down
5 changes: 0 additions & 5 deletions src/flisp/system.lsp
Original file line number Diff line number Diff line change
Expand Up @@ -611,11 +611,6 @@
#;(define (table.values t)
(table.foldl (lambda (k v z) (cons v z))
() t))
#;(define (table.clone t)
(let ((nt (table)))
(table.foldl (lambda (k v z) (put! nt k v))
() t)
nt))
#;(define (table.invert t)
(let ((nt (table)))
(table.foldl (lambda (k v z) (put! nt v k))
Expand Down
5 changes: 3 additions & 2 deletions src/jloptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,9 @@ JL_DLLEXPORT void jl_parse_opts(int *argcp, char ***argvp)
}
jl_options.code_coverage = codecov;
jl_options.malloc_log = malloclog;
*argvp += optind;
*argcp -= optind;
int proc_args = *argcp < optind ? *argcp : optind;
*argvp += proc_args;
*argcp -= proc_args;
}

JL_DLLEXPORT void jl_set_ARGS(int argc, char **argv)
Expand Down
Loading