Skip to content
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

release-1.6: Backports for 1.6.7 #45319

Merged
merged 34 commits into from
Jul 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
008432c
`base/version_git.sh`: fix the default value for `Base.GIT_VERSION_IN…
DilumAluthge Jan 9, 2022
16944c3
MPFR: Fix `round(Integer, big(Inf))` (#44676)
barucden Mar 21, 2022
c908046
errors: fix handling of `.op` in lowering (#44770)
simeonschaub Mar 28, 2022
89b3c22
fix missing field type initialization vars (#44797)
vtjnash Apr 7, 2022
159ce70
[REPL] Fix a REPL test failure by removing an erroneous space in test…
vtjnash Apr 14, 2022
294b142
Fix embedding with MSVC (#44976)
barche Apr 14, 2022
80ffc2e
Update Example header in admonition to render PDF better, see #44866.…
ViralBShah Apr 19, 2022
9e9879b
gc-ext: only sweep unmarked objects (#45035)
vtjnash Apr 20, 2022
ea8455b
Create a copy while evaluating eigvals(::Diagonal) (#45048)
jishnub May 2, 2022
364d483
Avoid race condition in cleaning up cache files (#45214)
simonbyrne May 8, 2022
1054327
Restore export of jl_options (#45308)
Taaitaaiger May 16, 2022
427daf1
Use `CartesianIndices(Rsrc)` as the shared iterator. (#45289)
N5N3 May 16, 2022
42f7a99
Typo fix. (#45333)
N5N3 May 17, 2022
87a22e4
Use root module when determining UUID in @artifact_str (#45392)
May 21, 2022
29559e0
Apply patch for GMP CVE-2021-43618 (#45375)
ViralBShah May 20, 2022
b7e4497
Update PCRE2 to 10.40 (#45398)
fxcoudert May 21, 2022
06d71b8
Fix a concurrency bug in `iterate(::Dict)` (#44534)
tkf Mar 12, 2022
4f793bb
[Zlib_jll] Update to v1.2.12+3 (#44810)
giordano Apr 4, 2022
ede6a24
Zlib: update version number (#45407)
fxcoudert May 21, 2022
ed7fb2a
profile: fix async deadlock (#44781)
vtjnash Mar 29, 2022
e0ecf0e
macOS: workaround a dyld/libunwind deadlock issue since 12.1
vtjnash Jan 7, 2022
5ec2d68
macOS: extend the workaround to cover the dyld/exc_server deadlock is…
vtjnash Jan 12, 2022
1b60be5
avoid using `@sync_add` on remotecalls (#44671)
exaexa Mar 23, 2022
240d427
Fix USE_BINARYBUILDER_OPENBLAS=0 on macOS (#42538)
staticfloat Oct 16, 2021
12719ea
OpenBLAS: Find objconv in its proper path (#45391)
fxcoudert May 21, 2022
dd6f86a
fix `===` when encountering null pointer (#44749)
Moelf Mar 29, 2022
8411f79
Update p7zip to 17.04 (#45435)
fxcoudert May 24, 2022
416a769
[Distributed] Set stdin to devnull before closing it
vtjnash Jan 26, 2022
038c949
Fix #39367, doc for inbounds use each index (#39369)
mbauman Jan 25, 2021
7989b16
Limit some buildkite jobs to run on only x86_64 machines (#45665)
staticfloat Jun 14, 2022
c3116fd
bump Pkg version to latest 1.6
Jun 15, 2022
064fb73
Pass along backlog keyword argument in Sockets.listen (#45737)
quinnj Jun 19, 2022
5c5c85a
Use https for downloading of unicode data from unicode.org (#45750)
ViralBShah Jun 19, 2022
443c321
[release-1.6] Backport MbedTLS security patches (#45848)
staticfloat Jul 4, 2022
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
1 change: 1 addition & 0 deletions .buildkite/pipelines/main/misc/doctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ agents:
# Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing
sandbox.jl: "true"
os: "linux"
arch: "x86_64"
steps:
- label: "doctest"
key: doctest
Expand Down
1 change: 1 addition & 0 deletions .buildkite/pipelines/main/misc/embedding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ agents:
# Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing
sandbox.jl: "true"
os: "linux"
arch: "x86_64"
steps:
- label: "embedding"
key: "embedding"
Expand Down
1 change: 1 addition & 0 deletions .buildkite/pipelines/main/misc/llvmpasses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ agents:
# Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing
sandbox.jl: "true"
os: "linux"
arch: "x86_64"
steps:
- label: "analyzegc"
key: "analyzegc"
Expand Down
1 change: 1 addition & 0 deletions .buildkite/pipelines/main/misc/sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ agents:
# Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing
sandbox.jl: "true"
os: "linux"
arch: "x86_64"
steps:
- label: "asan"
key: "asan"
Expand Down
1 change: 1 addition & 0 deletions .buildkite/pipelines/main/misc/whitespace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ agents:
# Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing
sandbox.jl: "true"
os: "linux"
arch: "x86_64"
steps:
- label: "whitespace"
key: "whitespace"
Expand Down
1 change: 1 addition & 0 deletions .buildkite/pipelines/main/platforms/package_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ agents:
# Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing
sandbox.jl: "true"
os: "linux"
arch: "x86_64"
steps:
- label: "package_${PLATFORM?}${LABEL?}"
key: package_${PLATFORM?}${LABEL?}
Expand Down
1 change: 1 addition & 0 deletions .buildkite/pipelines/main/platforms/tester_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ agents:
# Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing
sandbox.jl: "true"
os: "linux"
arch: "x86_64"
steps:
- label: "tester_${PLATFORM?}${LABEL?}"
key: tester_${PLATFORM?}${LABEL?}
Expand Down
9 changes: 7 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,13 @@ New library functions
* New function `Base.rest` for taking the rest of a collection, starting from a specific
iteration state, in a generic way ([#37410]).

New library features
--------------------
Library changes
---------------

* A known concurrency issue of `iterate` methods on `Dict` and other derived objects such
as `keys(::Dict)`, `values(::Dict)`, and `Set` is fixed. These methods of `iterate` can
now be called on a dictionary or set shared by arbitrary tasks provided that there are no
tasks mutating the dictionary or set ([#44534]).

* The `redirect_*` functions now accept `devnull` to discard all output redirected to it, and as an empty
input ([#36146]).
Expand Down
2 changes: 1 addition & 1 deletion base/dict.jl
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ end

@propagate_inbounds _iterate(t::Dict{K,V}, i) where {K,V} = i == 0 ? nothing : (Pair{K,V}(t.keys[i],t.vals[i]), i == typemax(Int) ? 0 : i+1)
@propagate_inbounds function iterate(t::Dict)
_iterate(t, skip_deleted_floor!(t))
_iterate(t, skip_deleted(t, t.idxfloor))
end
@propagate_inbounds iterate(t::Dict, i) = _iterate(t, skip_deleted(t, i))

Expand Down
2 changes: 1 addition & 1 deletion base/essentials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ element `i` of array `A` is skipped to improve performance.
```julia
function sum(A::AbstractArray)
r = zero(eltype(A))
for i = 1:length(A)
for i in eachindex(A)
@inbounds r += A[i]
end
return r
Expand Down
3 changes: 1 addition & 2 deletions base/floatfuncs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@ julia> round(357.913; sigdigits=4, base=2)
Rounding to specified digits in bases other than 2 can be inexact when
operating on binary floating point numbers. For example, the [`Float64`](@ref)
value represented by `1.15` is actually *less* than 1.15, yet will be
rounded to 1.2.
rounded to 1.2. For example:

# Examples
```jldoctest; setup = :(using Printf)
julia> x = 1.15
1.15
Expand Down
2 changes: 1 addition & 1 deletion base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ function compilecache(pkg::PkgId, path::String, internal_stderr::IO = stderr, in
cachefiles = filter!(x -> startswith(x, entryfile * "_"), readdir(cachepath))
if length(cachefiles) >= MAX_NUM_PRECOMPILE_FILES[]
idx = findmin(mtime.(joinpath.(cachepath, cachefiles)))[2]
rm(joinpath(cachepath, cachefiles[idx]))
rm(joinpath(cachepath, cachefiles[idx]); force=true)
end
end

Expand Down
9 changes: 8 additions & 1 deletion base/mpfr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,14 @@ function round(::Type{T}, x::BigFloat, r::Union{RoundingMode, MPFRRoundingMode})
end
return unsafe_trunc(T, res)
end
round(::Type{BigInt}, x::BigFloat, r::Union{RoundingMode, MPFRRoundingMode}) = _unchecked_cast(BigInt, x, r)

function round(::Type{BigInt}, x::BigFloat, r::Union{RoundingMode, MPFRRoundingMode})
clear_flags()
res = _unchecked_cast(BigInt, x, r)
had_range_exception() && throw(InexactError(:round, BigInt, x))
return res
end

round(::Type{T}, x::BigFloat, r::RoundingMode) where T<:Union{Signed, Unsigned} =
invoke(round, Tuple{Type{<:Union{Signed, Unsigned}}, BigFloat, Union{RoundingMode, MPFRRoundingMode}}, T, x, r)
round(::Type{BigInt}, x::BigFloat, r::RoundingMode) =
Expand Down
12 changes: 7 additions & 5 deletions base/multidimensional.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1076,16 +1076,18 @@ function copyto!(dest::AbstractArray{T1,N}, Rdest::CartesianIndices{N},
checkbounds(src, first(Rsrc))
checkbounds(src, last(Rsrc))
src′ = unalias(dest, src)
ΔI = first(Rdest) - first(Rsrc)
CRdest = CartesianIndices(Rdest)
CRsrc = CartesianIndices(Rsrc)
ΔI = first(CRdest) - first(CRsrc)
if @generated
quote
@nloops $N i (n->Rsrc.indices[n]) begin
@inbounds @nref($N,dest,n->i_n+ΔI[n]) = @nref($N,src′,i)
@nloops $N i (n->CRsrc.indices[n]) begin
@inbounds @nref($N,dest,n->Rdest.indices[n][i_n+ΔI[n]]) = @nref($N,src′,n->Rsrc.indices[n][i_n])
end
end
else
for I in Rsrc
@inbounds dest[I + ΔI] = src′[I]
for I in CRsrc
@inbounds dest[Rdest[I + ΔI]] = src′[Rsrc[I]]
end
end
dest
Expand Down
37 changes: 36 additions & 1 deletion base/task.jl
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,12 @@ isolating the asynchronous code from changes to the variable's value in the curr
Interpolating values via `\$` is available as of Julia 1.4.
"""
macro async(expr)
do_async_macro(expr)
end

# generate the code for @async, possibly wrapping the task in something before
# pushing it to the wait queue.
function do_async_macro(expr; wrap=identity)
letargs = Base._lift_one_interp!(expr)

thunk = esc(:(()->($expr)))
Expand All @@ -414,14 +420,43 @@ macro async(expr)
let $(letargs...)
local task = Task($thunk)
if $(Expr(:islocal, var))
put!($var, task)
put!($var, $(wrap(:task)))
end
schedule(task)
task
end
end
end

# task wrapper that doesn't create exceptions wrapped in TaskFailedException
struct UnwrapTaskFailedException
task::Task
end

# common code for wait&fetch for UnwrapTaskFailedException
function unwrap_task_failed(f::Function, t::UnwrapTaskFailedException)
try
f(t.task)
catch ex
if ex isa TaskFailedException
throw(ex.task.exception)
else
rethrow()
end
end
end

# the unwrapping for above task wrapper (gets triggered in sync_end())
wait(t::UnwrapTaskFailedException) = unwrap_task_failed(wait, t)

# same for fetching the tasks, for convenience
fetch(t::UnwrapTaskFailedException) = unwrap_task_failed(fetch, t)

# macro for running async code that doesn't throw wrapped exceptions
macro async_unwrap(expr)
do_async_macro(expr, wrap=task->:(Base.UnwrapTaskFailedException($task)))
end

# Capture interpolated variables in $() and move them to let-block
function _lift_one_interp!(e)
letargs = Any[] # store the new gensymed arguments
Expand Down
4 changes: 2 additions & 2 deletions base/version_git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cd $1
if [ "$#" = "2" -a "$2" = "NO_GIT" ]; then
# this comment is used in base/Makefile to distinguish boilerplate
echo "# Default output if git is not available."
echo "const GIT_VERSION_INFO = GitVersionInfo(\"\" ,\"\" ,\"\" ,0 ,\"\" ,true ,0 ,0.)"
echo 'const GIT_VERSION_INFO = GitVersionInfo("", "", "", 0, "", true, 0, 0.0, "", "")'
exit 0
fi
# Collect temporary variables
Expand Down Expand Up @@ -101,7 +101,7 @@ echo " $build_number,"
echo " \"$date_string\","
echo " $tagged_commit,"
echo " $fork_master_distance,"
echo " $fork_master_timestamp.,"
echo " $fork_master_timestamp.0,"
echo " \"$build_system_commit\","
echo " \"$build_system_commit_short\","
echo ")"
4 changes: 4 additions & 0 deletions cli/loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#define realloc loader_realloc
#endif

#include <stdint.h>

#ifdef _OS_WINDOWS_
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
Expand Down Expand Up @@ -105,3 +107,5 @@ int wchar_to_utf8(const wchar_t * wstr, char *str, size_t maxlen);
int utf8_to_wchar(const char * str, wchar_t *wstr, size_t maxlen);
void setup_stdio(void);
#endif

#include "../src/jloptions.h"
4 changes: 4 additions & 0 deletions cli/loader_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ __attribute__((constructor)) void jl_load_libjulia_internal(void) {
for (unsigned int symbol_idx=0; jl_exported_func_names[symbol_idx] != NULL; ++symbol_idx) {
(*jl_exported_func_addrs[symbol_idx]) = lookup_symbol(libjulia_internal, jl_exported_func_names[symbol_idx]);
}

// jl_options must be initialized very early, in case an embedder sets some
// values there before calling jl_init
((void (*)(void))jl_init_options_addr)();
}

// Load libjulia and run the REPL with the given arguments (in UTF-8 format)
Expand Down
8 changes: 4 additions & 4 deletions deps/Versions.make
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ DSFMT_VER := 2.2.4
DSFMT_JLL_NAME := dSFMT

# GMP
GMP_VER := 6.2.0
GMP_VER := 6.2.1
GMP_JLL_NAME := GMP

# LibCURL
Expand Down Expand Up @@ -87,11 +87,11 @@ OSXUNWIND_JLL_VER := 0.0.6+1
PATCHELF_VER := 0.9

# p7zip
P7ZIP_VER := 16.2.0
P7ZIP_VER := 17.04
P7ZIP_JLL_NAME := p7zip

# PCRE
PCRE_VER := 10.36
PCRE_VER := 10.40
PCRE_JLL_NAME := PCRE2

# SuiteSparse
Expand All @@ -104,7 +104,7 @@ UNWIND_JLL_NAME := LibUnwind
UNWIND_JLL_VER := 1.3.2+6

# zlib
ZLIB_VER := 1.2.11
ZLIB_VER := 1.2.12
ZLIB_JLL_NAME := Zlib

# Specify the version of the Mozilla CA Certificate Store to obtain.
Expand Down
4 changes: 2 additions & 2 deletions deps/blas.mk
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ endif
ifeq ($(USE_BLAS64), 1)
OPENBLAS_BUILD_OPTS += INTERFACE64=1 SYMBOLSUFFIX="$(OPENBLAS_SYMBOLSUFFIX)" LIBPREFIX="libopenblas$(OPENBLAS_LIBNAMESUFFIX)"
ifeq ($(OS), Darwin)
OPENBLAS_BUILD_OPTS += OBJCONV=$(abspath $(BUILDDIR)/objconv/objconv)
$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/build-compiled: | $(BUILDDIR)/objconv/build-compiled
OPENBLAS_BUILD_OPTS += OBJCONV=$(abspath $(build_depsbindir)/objconv)
$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/build-compiled: | $(build_prefix)/manifest/objconv
endif
endif

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7a68069fd63b0152c9a494a0866a25c7
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
829d7524d0750f4c57fbf0557b4db0e029c07c7dfb0fbb0c772d1d983df4da6b1693cb653b0b615fec2e1c8ef8e4b1a52ad0ef0cee04527e72ac4a4500982cc8

This file was deleted.

This file was deleted.

Loading