From ed0658a6c9601e1f8570950d0e93efa509011f1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogumi=C5=82=20Kami=C5=84ski?= Date: Tue, 18 Jan 2022 19:33:12 +0100 Subject: [PATCH 01/40] Add defalg methods to resolve potential dispatch ambiguities (#43426) We could also consider adding `defalg(v::AbstractArray{<:Number}) = DEFAULT_UNSTABLE`, but it is unlikely that someone will want to do `Union` of `<:Number` and something other than `Missing` that still would support comparison. Relevant for https://github.com/JuliaStrings/InlineStrings.jl/issues/21 (and other custom types that will want to add `defalg` support allowing for `Union` with `Missing`). (cherry picked from commit eb724e0065bdcc50da103d00f4a9e98757cdb5d7) --- base/sort.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/base/sort.jl b/base/sort.jl index afde46232cec1..cc68e4b4d9b25 100644 --- a/base/sort.jl +++ b/base/sort.jl @@ -656,6 +656,8 @@ end defalg(v::AbstractArray) = DEFAULT_STABLE defalg(v::AbstractArray{<:Union{Number, Missing}}) = DEFAULT_UNSTABLE +defalg(v::AbstractArray{Missing}) = DEFAULT_UNSTABLE +defalg(v::AbstractArray{Union{}}) = DEFAULT_UNSTABLE function sort!(v::AbstractVector, alg::Algorithm, order::Ordering) inds = axes(v,1) From 21fd19bef42b965ce9b45ccc299076fb69d5b9a2 Mon Sep 17 00:00:00 2001 From: Daniel Karrasch Date: Sat, 29 Jan 2022 03:45:02 +0100 Subject: [PATCH 02/40] Fix typo in triangular ldiv! (#43962) (cherry picked from commit c3235cdacbaabc77d1d5bdb926d2df27f3848af4) --- stdlib/LinearAlgebra/src/triangular.jl | 2 +- stdlib/LinearAlgebra/test/triangular.jl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/stdlib/LinearAlgebra/src/triangular.jl b/stdlib/LinearAlgebra/src/triangular.jl index c141f6469e359..ae35fd8fa6c68 100644 --- a/stdlib/LinearAlgebra/src/triangular.jl +++ b/stdlib/LinearAlgebra/src/triangular.jl @@ -1474,7 +1474,7 @@ end function ldiv!(xA::Union{UpperTriangular,UnitUpperTriangular}, B::UpperTriangular) return UpperTriangular(ldiv!(xA, triu!(B.data))) end -function ldiv!(xA::Union{LowerTriangular,UnitLowerTriangular}, B::UpperTriangular) +function ldiv!(xA::Union{LowerTriangular,UnitLowerTriangular}, B::LowerTriangular) return LowerTriangular(ldiv!(xA, tril!(B.data))) end diff --git a/stdlib/LinearAlgebra/test/triangular.jl b/stdlib/LinearAlgebra/test/triangular.jl index 030e4a27625f6..5c3c80fdf1666 100644 --- a/stdlib/LinearAlgebra/test/triangular.jl +++ b/stdlib/LinearAlgebra/test/triangular.jl @@ -376,7 +376,8 @@ for elty1 in (Float32, Float64, BigFloat, ComplexF32, ComplexF64, Complex{BigFlo @test_throws DimensionMismatch A2' * offsizeA @test_throws DimensionMismatch A2 * offsizeA if (uplo1 == uplo2 && elty1 == elty2 != Int && t1 != UnitLowerTriangular && t1 != UnitUpperTriangular) - @test rdiv!(copy(A1), copy(A2)) ≈ A1/A2 ≈ Matrix(A1)/Matrix(A2) + @test rdiv!(copy(A1), copy(A2))::t1 ≈ A1/A2 ≈ Matrix(A1)/Matrix(A2) + @test ldiv!(copy(A2), copy(A1))::t1 ≈ A2\A1 ≈ Matrix(A2)\Matrix(A1) end if (uplo1 != uplo2 && elty1 == elty2 != Int && t2 != UnitLowerTriangular && t2 != UnitUpperTriangular) @test lmul!(adjoint(copy(A1)), copy(A2)) ≈ A1'*A2 ≈ Matrix(A1)'*Matrix(A2) From 34126a1739f78aaf1b128d7fb43e8eb95db5c9a6 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 3 Feb 2022 05:49:32 +0100 Subject: [PATCH 03/40] Fix detection of LIBGFORTRAN_VERSION (#44026) (cherry picked from commit 1edafa005ad1272983b0ff8fdf05c5a3f6e249b9) --- Make.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Make.inc b/Make.inc index 0f9c2a82e5e47..996e53ebf8e7d 100644 --- a/Make.inc +++ b/Make.inc @@ -1172,7 +1172,7 @@ endif # Auto-detect triplet once, create different versions that we use as defaults below for each BB install target FC_VERSION := $(shell $(FC) --version 2>/dev/null | head -1) -FC_OR_CC_VERISON := $(or $(FC_VERSION),$(shell $(CC) --version 2>/dev/null | head -1)) +FC_OR_CC_VERSION := $(or $(FC_VERSION),$(shell $(CC) --version 2>/dev/null | head -1)) BB_TRIPLET_LIBGFORTRAN_CXXABI := $(shell $(call invoke_python,$(JULIAHOME)/contrib/normalize_triplet.py) $(or $(XC_HOST),$(XC_HOST),$(BUILD_MACHINE)) "$(FC_OR_CC_VERSION)" "$(or $(shell echo '\#include ' | $(CXX) $(CXXFLAGS) -x c++ -dM -E - | grep _GLIBCXX_USE_CXX11_ABI | awk '{ print $$3 }' ),1)") BB_TRIPLET_LIBGFORTRAN := $(subst $(SPACE),-,$(filter-out cxx%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN_CXXABI)))) BB_TRIPLET_CXXABI := $(subst $(SPACE),-,$(filter-out libgfortran%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN_CXXABI)))) From 462b7b4e3ed818c5693ff55629b95a52ae5a3be4 Mon Sep 17 00:00:00 2001 From: David Bach Date: Thu, 3 Feb 2022 10:35:39 +0100 Subject: [PATCH 04/40] Dates parsing: remove `throw InexactError` from `tryparsenext`, fixes #44003 (#44004) (cherry picked from commit c10dac100a76e90279f83d4aac330b92f15cd0e0) --- stdlib/Dates/src/io.jl | 2 +- stdlib/Dates/test/io.jl | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/stdlib/Dates/src/io.jl b/stdlib/Dates/src/io.jl index ba0958b57f613..7e007ced0bbee 100644 --- a/stdlib/Dates/src/io.jl +++ b/stdlib/Dates/src/io.jl @@ -150,7 +150,7 @@ struct Decimal3 end len = ii - i if len > 3 ms, r = divrem(ms0, Int64(10) ^ (len - 3)) - r == 0 || throw(InexactError(:convert, Decimal3, ms0)) + r == 0 || return nothing else ms = ms0 * Int64(10) ^ (3 - len) end diff --git a/stdlib/Dates/test/io.jl b/stdlib/Dates/test/io.jl index 822d0101c28ba..1c50676eb8346 100644 --- a/stdlib/Dates/test/io.jl +++ b/stdlib/Dates/test/io.jl @@ -465,13 +465,17 @@ end # Issue #21504 @test tryparse(Dates.Date, "0-1000") === nothing +# Issue #44003 +@test tryparse(Dates.Date, "2017", Dates.DateFormat(".s")) === nothing + @testset "parse milliseconds, Issue #22100" begin @test Dates.DateTime("2017-Mar-17 00:00:00.0000", "y-u-d H:M:S.s") == Dates.DateTime(2017, 3, 17) @test Dates.parse_components(".1", Dates.DateFormat(".s")) == [Dates.Millisecond(100)] @test Dates.parse_components(".12", Dates.DateFormat(".s")) == [Dates.Millisecond(120)] @test Dates.parse_components(".123", Dates.DateFormat(".s")) == [Dates.Millisecond(123)] @test Dates.parse_components(".1230", Dates.DateFormat(".s")) == [Dates.Millisecond(123)] - @test_throws InexactError Dates.parse_components(".1234", Dates.DateFormat(".s")) + # Issue #44003 + @test_throws ArgumentError Dates.parse_components(".1234", Dates.DateFormat(".s")) # Ensure that no overflow occurs when using Int32 literals: Int32(10)^10 @test Dates.parse_components("." * rpad(999, 10, '0'), Dates.DateFormat(".s")) == [Dates.Millisecond(999)] From 4026d5da791e82f935d189b71cd31b18312129f9 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Mon, 7 Feb 2022 13:49:32 -0500 Subject: [PATCH 05/40] fix #43960, evaluation order of splat inside ref (#44024) (cherry picked from commit 546a77474bf730569e651b60415a187da769fb64) --- src/julia-syntax.scm | 48 +++++++++++++++++++++----------------------- test/syntax.jl | 8 ++++++++ 2 files changed, 31 insertions(+), 25 deletions(-) diff --git a/src/julia-syntax.scm b/src/julia-syntax.scm index acd1887cbb4fc..cfccc6da02088 100644 --- a/src/julia-syntax.scm +++ b/src/julia-syntax.scm @@ -130,31 +130,29 @@ ;; returns (values index-list stmts) where stmts are statements that need ;; to execute first. (define (process-indices a i) - (let loop ((lst i) - (n 1) - (stmts '()) - (tuples '()) - (ret '())) - (if (null? lst) - (values (reverse ret) (reverse stmts)) - (let ((idx (car lst)) - (last (null? (cdr lst)))) - (if (and (pair? idx) (eq? (car idx) '...)) - (if (symbol-like? (cadr idx)) - (loop (cdr lst) (+ n 1) - stmts - (cons (cadr idx) tuples) - (cons `(... ,(replace-beginend (cadr idx) a n tuples last)) - ret)) - (let ((g (make-ssavalue))) - (loop (cdr lst) (+ n 1) - (cons `(= ,g ,(replace-beginend (cadr idx) a n tuples last)) - stmts) - (cons g tuples) - (cons `(... ,g) ret)))) - (loop (cdr lst) (+ n 1) - stmts tuples - (cons (replace-beginend idx a n tuples last) ret))))))) + (let ((has-va? (any vararg? i))) + (let loop ((lst i) + (n 1) + (stmts '()) + (tuples '()) + (ret '())) + (if (null? lst) + (values (reverse ret) (reverse stmts)) + (let* ((idx0 (car lst)) + (idx (if (vararg? idx0) (cadr idx0) idx0)) + (last (null? (cdr lst))) + (replaced (replace-beginend idx a n tuples last)) + (idx (if (or (not has-va?) (simple-atom? replaced)) replaced (make-ssavalue)))) + (loop (cdr lst) (+ n 1) + (if (eq? idx replaced) + stmts + (cons `(= ,idx ,replaced) + stmts)) + (if (vararg? idx0) (cons idx tuples) tuples) + (cons (if (vararg? idx0) + `(... ,idx) + idx) + ret))))))) ;; GF method does not need to keep decl expressions on lambda args ;; except for rest arg diff --git a/test/syntax.jl b/test/syntax.jl index 6e0922a9c1331..803d092270ee3 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -1204,6 +1204,14 @@ end @test [(0,0)... 1] == [0 0 1] @test Float32[(0,0)... 1] == Float32[0 0 1] +# issue #43960, evaluation order of splatting in `ref` +let a = [], b = [4,3,2,1] + f() = (push!(a, 1); 2) + g() = (push!(a, 2); ()) + @test b[f(), g()...] == 3 + @test a == [1,2] +end + @testset "raw_str macro" begin @test raw"$" == "\$" @test raw"\n" == "\\n" From 482eb3ceaf68eb0d8c56d5e30b2020d60cf7923f Mon Sep 17 00:00:00 2001 From: Jasha10 <8935917+Jasha10@users.noreply.github.com> Date: Sat, 12 Feb 2022 11:09:55 -0600 Subject: [PATCH 06/40] fix asyncmap docs typo (#43571) (cherry picked from commit 4c101a1558fb627d16246ec2adf53249e865e5dd) --- base/asyncmap.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/asyncmap.jl b/base/asyncmap.jl index 976ce6c7b85ca..740e5e62879c7 100644 --- a/base/asyncmap.jl +++ b/base/asyncmap.jl @@ -15,7 +15,7 @@ up to 100 tasks will be used for concurrent mapping. `ntasks` can also be specified as a zero-arg function. In this case, the number of tasks to run in parallel is checked before processing every element and a new -task started if the value of `ntasks_func` is less than the current number +task started if the value of `ntasks_func` is greater than the current number of tasks. If `batch_size` is specified, the collection is processed in batch mode. `f` must From 84fe737e19cf213ff9eaffee1f6460ea4b2a2cbf Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Tue, 15 Feb 2022 18:46:53 +0100 Subject: [PATCH 07/40] fix UndefRefError for documentation system (#44060) * fix UndefRefError for documentation system * add a test Co-authored-by: Jameson Nash (cherry picked from commit 48420071e36cffb15e1166a1e65a359d58c6d9b4) --- stdlib/REPL/src/docview.jl | 2 +- stdlib/REPL/test/docview.jl | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/stdlib/REPL/src/docview.jl b/stdlib/REPL/src/docview.jl index f4467b3e787bc..2d866d1ea05ce 100644 --- a/stdlib/REPL/src/docview.jl +++ b/stdlib/REPL/src/docview.jl @@ -283,7 +283,7 @@ function summarize(io::IO, TT::Type, binding::Binding) println(io, "# Fields") println(io, "```") pad = maximum(length(string(f)) for f in fieldnames(T)) - for (f, t) in zip(fieldnames(T), T.types) + for (f, t) in zip(fieldnames(T), fieldtypes(T)) println(io, rpad(f, pad), " :: ", t) end println(io, "```") diff --git a/stdlib/REPL/test/docview.jl b/stdlib/REPL/test/docview.jl index 160544eb475d2..9757cdb5df097 100644 --- a/stdlib/REPL/test/docview.jl +++ b/stdlib/REPL/test/docview.jl @@ -51,3 +51,11 @@ end @testset "Unicode doc lookup (#41589)" begin @test REPL.lookup_doc(:(÷=)) isa Markdown.MD end + +@testset "#44009" begin + R = Complex{<:Integer} + b = REPL.Binding(@__MODULE__, :R) + @test REPL.summarize(b, Tuple{}) isa Markdown.MD +end + + From 72cf83dbf51d9a7e7d30c0a330fc861417ff5ae4 Mon Sep 17 00:00:00 2001 From: Steve Kelly Date: Tue, 15 Feb 2022 15:49:20 -0500 Subject: [PATCH 08/40] completely initialize SystemError (#44192) (cherry picked from commit 2db86f2360a03530b34b1d35bd86fb53fa841422) --- base/io.jl | 2 +- test/error.jl | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/base/io.jl b/base/io.jl index 30a87aa9e1cf3..5b846af8bfac3 100644 --- a/base/io.jl +++ b/base/io.jl @@ -20,7 +20,7 @@ struct SystemError <: Exception extrainfo SystemError(p::AbstractString, e::Integer, extrainfo) = new(p, e, extrainfo) SystemError(p::AbstractString, e::Integer) = new(p, e, nothing) - SystemError(p::AbstractString) = new(p, Libc.errno()) + SystemError(p::AbstractString) = new(p, Libc.errno(), nothing) end lock(::IO) = nothing diff --git a/test/error.jl b/test/error.jl index 38ea378664241..e9d011e382a61 100644 --- a/test/error.jl +++ b/test/error.jl @@ -81,3 +81,8 @@ end # non-Functions @test retry(Float64)(1) === 1.0 end + +@testset "SystemError initialization" begin + e = SystemError("fail") + @test e.extrainfo === nothing +end From a2a7623dbf2defb8dd351f47d9d5565b25b9d648 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Wed, 16 Feb 2022 06:24:13 -0500 Subject: [PATCH 09/40] fix next prompt detector in `generate_precompile_statements` (#44196) (cherry picked from commit c839221d41574f9b496232b1642ac126f9e8586c) --- contrib/generate_precompile.jl | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/contrib/generate_precompile.jl b/contrib/generate_precompile.jl index 6915ecfc4b99a..26ef79726d4de 100644 --- a/contrib/generate_precompile.jl +++ b/contrib/generate_precompile.jl @@ -226,6 +226,11 @@ if Profile !== nothing """ end +const JULIA_PROMPT = "julia> " +const PKG_PROMPT = "pkg> " +const SHELL_PROMPT = "shell> " +const HELP_PROMPT = "help?> " + function generate_precompile_statements() start_time = time_ns() debug_output = devnull # or stdout @@ -308,7 +313,7 @@ function generate_precompile_statements() close(ptm) end # wait for the definitive prompt before start writing to the TTY - readuntil(output_copy, "julia>") + readuntil(output_copy, JULIA_PROMPT) sleep(0.1) readavailable(output_copy) # Input our script @@ -326,9 +331,16 @@ function generate_precompile_statements() write(ptm, l, "\n") readuntil(output_copy, "\n") # wait for the next prompt-like to appear - # NOTE: this is rather inaccurate because the Pkg REPL mode is a special flower readuntil(output_copy, "\n") - readuntil(output_copy, "> ") + strbuf = "" + while true + strbuf *= String(readavailable(output_copy)) + occursin(JULIA_PROMPT, strbuf) && break + occursin(PKG_PROMPT, strbuf) && break + occursin(SHELL_PROMPT, strbuf) && break + occursin(HELP_PROMPT, strbuf) && break + sleep(0.1) + end end println() end From 9c11dcbdf9f82c93c857d6a840b6242d62a8c4b9 Mon Sep 17 00:00:00 2001 From: Nicholas Bauer Date: Wed, 16 Feb 2022 06:41:54 -0500 Subject: [PATCH 10/40] Tighten validation of `hvncat` implementation (#43940) (cherry picked from commit 76dc3799708571f1897ff25aaaefda3890b97f61) --- base/abstractarray.jl | 18 ++++++++++++++++++ test/abstractarray.jl | 4 ++++ 2 files changed, 22 insertions(+) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index 2a19b60c73e23..74f6356e59944 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -2315,6 +2315,24 @@ function _typed_hvncat_dims(::Type{T}, dims::NTuple{N, Int}, row_first::Bool, as outdims = zeros(Int, N) + # validate shapes for lowest level of concatenation + d = findfirst(>(1), dims) + if d !== nothing # all dims are 1 + nblocks = length(as) ÷ dims[d] + for b ∈ 1:nblocks + offset = ((b - 1) * dims[d]) + startelementi = offset + 1 + for i ∈ offset .+ (2:dims[d]) + for dd ∈ 1:N + dd == d && continue + if size(as[startelementi], dd) != size(as[i], dd) + throw(ArgumentError("incompatible shape in element $i")) + end + end + end + end + end + # discover number of rows or columns for i ∈ 1:dims[d1] outdims[d1] += cat_size(as[i], d1) diff --git a/test/abstractarray.jl b/test/abstractarray.jl index b2b53d33db8ec..ee4c0cbd2f4fd 100644 --- a/test/abstractarray.jl +++ b/test/abstractarray.jl @@ -1534,6 +1534,10 @@ using Base: typed_hvncat @test Int[] == typed_hvncat(Int, 1) isa Array{Int, 1} @test Array{Int, 2}(undef, 0, 0) == typed_hvncat(Int, 2) isa Array{Int, 2} @test Array{Int, 3}(undef, 0, 0, 0) == typed_hvncat(Int, 3) isa Array{Int, 3} + + # Issue 43933 - semicolon precedence mistake should produce an error + @test_throws ArgumentError [[1 1]; 2 ;; 3 ; [3 4]] + @test_throws ArgumentError [[1 ;;; 1]; 2 ;;; 3 ; [3 ;;; 4]] end @testset "keepat!" begin From 7cb54f29bcefd6c2b189ed9060d8974947008890 Mon Sep 17 00:00:00 2001 From: Seth Axen Date: Sat, 19 Feb 2022 18:46:55 +0100 Subject: [PATCH 11/40] Fix dot(::Adjoint, ::Adjoint) for numbers that don't commute under multiplication (#44219) Co-authored-by: Fredrik Ekre (cherry picked from commit 928f63ca85d4d8065e6709671f6f8735aa3ec756) --- stdlib/LinearAlgebra/src/generic.jl | 4 +++- stdlib/LinearAlgebra/test/generic.jl | 13 +++++++------ test/testhelpers/Quaternions.jl | 14 ++++++++++++++ 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/stdlib/LinearAlgebra/src/generic.jl b/stdlib/LinearAlgebra/src/generic.jl index cf7e474468785..1395d70ff47bb 100644 --- a/stdlib/LinearAlgebra/src/generic.jl +++ b/stdlib/LinearAlgebra/src/generic.jl @@ -919,7 +919,9 @@ function dot(x::AbstractArray, y::AbstractArray) s end -dot(x::Adjoint, y::Adjoint) = conj(dot(parent(x), parent(y))) +function dot(x::Adjoint{<:Union{Real,Complex}}, y::Adjoint{<:Union{Real,Complex}}) + return conj(dot(parent(x), parent(y))) +end dot(x::Transpose, y::Transpose) = dot(parent(x), parent(y)) """ diff --git a/stdlib/LinearAlgebra/test/generic.jl b/stdlib/LinearAlgebra/test/generic.jl index 489b96be56019..83a97777cef90 100644 --- a/stdlib/LinearAlgebra/test/generic.jl +++ b/stdlib/LinearAlgebra/test/generic.jl @@ -480,20 +480,21 @@ end end @testset "adjtrans dot" begin - for t in (transpose, adjoint) - x, y = t(rand(ComplexF64, 10)), t(rand(ComplexF64, 10)) + for t in (transpose, adjoint), T in (ComplexF64, Quaternion{Float64}) + x, y = t(rand(T, 10)), t(rand(T, 10)) X, Y = copy(x), copy(y) @test dot(x, y) ≈ dot(X, Y) - x, y = t([rand(ComplexF64, 2, 2) for _ in 1:5]), t([rand(ComplexF64, 2, 2) for _ in 1:5]) + x, y = t([rand(T, 2, 2) for _ in 1:5]), t([rand(T, 2, 2) for _ in 1:5]) X, Y = copy(x), copy(y) @test dot(x, y) ≈ dot(X, Y) - x, y = t(rand(ComplexF64, 10, 5)), t(rand(ComplexF64, 10, 5)) + x, y = t(rand(T, 10, 5)), t(rand(T, 10, 5)) X, Y = copy(x), copy(y) @test dot(x, y) ≈ dot(X, Y) - x = t([rand(ComplexF64, 2, 2) for _ in 1:5, _ in 1:5]) - y = t([rand(ComplexF64, 2, 2) for _ in 1:5, _ in 1:5]) + x = t([rand(T, 2, 2) for _ in 1:5, _ in 1:5]) + y = t([rand(T, 2, 2) for _ in 1:5, _ in 1:5]) X, Y = copy(x), copy(y) @test dot(x, y) ≈ dot(X, Y) + x, y = t([rand(T, 2, 2) for _ in 1:5]), t([rand(T, 2, 2) for _ in 1:5]) end end diff --git a/test/testhelpers/Quaternions.jl b/test/testhelpers/Quaternions.jl index a3967c1aacc43..1eddad322ec40 100644 --- a/test/testhelpers/Quaternions.jl +++ b/test/testhelpers/Quaternions.jl @@ -1,6 +1,7 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license module Quaternions +using Random export Quaternion @@ -36,4 +37,17 @@ Base.:(*)(q::Quaternion, b::Bool) = b * q # remove method ambiguity Base.:(/)(q::Quaternion, w::Quaternion) = q * conj(w) * (1.0 / abs2(w)) Base.:(\)(q::Quaternion, w::Quaternion) = conj(q) * w * (1.0 / abs2(q)) +# adapted from https://github.com/JuliaGeometry/Quaternions.jl/pull/42 +function Base.rand(rng::AbstractRNG, ::Random.SamplerType{Quaternion{T}}) where {T<:Real} + return Quaternion{T}(rand(rng, T), rand(rng, T), rand(rng, T), rand(rng, T)) +end +function Base.randn(rng::AbstractRNG, ::Type{Quaternion{T}}) where {T<:AbstractFloat} + return Quaternion{T}( + randn(rng, T) / 2, + randn(rng, T) / 2, + randn(rng, T) / 2, + randn(rng, T) / 2, + ) +end + end From 79e36c98215d85accbd6b6164126023ff5c7e525 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Sat, 19 Feb 2022 09:47:41 -0800 Subject: [PATCH 12/40] Ensure that `open(::Function, ::Cmd)` waits for termination (#44078) On Windows, we observed occasional issues where an error within the function callback to the `open(::Function, ::Cmd)` method would cause problems due to assuming that the opened process had finished by the time the `open()` call was finished. In most cases this was true, however on Windows, it was found that we need to explicitly `wait()` upon the process object to ensure that all file handles held by the subprocess were properly closed by the time `open()` is finished. Co-authored-by: Dilum Aluthge (cherry picked from commit 623ceb7834de47538eddeadfa84a8bf2d9741248) --- base/process.jl | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/base/process.jl b/base/process.jl index b3ec79fa1ab4e..7f329bbe1b718 100644 --- a/base/process.jl +++ b/base/process.jl @@ -391,16 +391,25 @@ process failed, or if the process attempts to print anything to stdout. """ function open(f::Function, cmds::AbstractCmd, args...; kwargs...) P = open(cmds, args...; kwargs...) + function waitkill(P::Process) + close(P) + # 0.1 seconds after we hope it dies (from closing stdio), + # we kill the process with SIGTERM (15) + local t = Timer(0.1) do t + process_running(P) && kill(P) + end + wait(P) + close(t) + end ret = try f(P) catch - kill(P) - close(P) + waitkill(P) rethrow() end close(P.in) if !eof(P.out) - close(P.out) + waitkill(P) throw(_UVError("open(do)", UV_EPIPE)) end success(P) || pipeline_error(P) From d0f0726311dc7150e429ede445943d4b66a66c44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Sun, 20 Feb 2022 16:17:43 +0000 Subject: [PATCH 13/40] [CPUID] Add ISA entries for A64FX and M1 (#44194) * [CPUID] Rework how current ISA is determined * [CPUID] Add ISA entry for A64FX * [CPUID] Add ISA entry for Apple Silicon M1 * [CPUID] Simplify collection of full set of features for architecture * [CPUID] Remove AES from A64FX ISA, not all chips appear to have it (cherry picked from commit f45b6adb5e8cd7fc59401d28183bc92c6df849f5) --- base/Base.jl | 6 +++--- base/binaryplatforms.jl | 3 ++- base/cpuid.jl | 28 +++++++++++++++++++++------- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/base/Base.jl b/base/Base.jl index b3da1458836c0..29b36219409d3 100644 --- a/base/Base.jl +++ b/base/Base.jl @@ -275,9 +275,6 @@ include("weakkeydict.jl") include("env.jl") -# BinaryPlatforms, used by Artifacts -include("binaryplatforms.jl") - # functions defined in Random function rand end function randn end @@ -332,6 +329,9 @@ using .Order include("sort.jl") using .Sort +# BinaryPlatforms, used by Artifacts. Needs `Sort`. +include("binaryplatforms.jl") + # Fast math include("fastmath.jl") using .FastMath diff --git a/base/binaryplatforms.jl b/base/binaryplatforms.jl index aff1de4a80993..fbdc02dde46ab 100644 --- a/base/binaryplatforms.jl +++ b/base/binaryplatforms.jl @@ -608,7 +608,8 @@ const arch_march_isa_mapping = let "armv8_0" => get_set("aarch64", "armv8.0-a"), "armv8_1" => get_set("aarch64", "armv8.1-a"), "armv8_2_crypto" => get_set("aarch64", "armv8.2-a+crypto"), - "armv8_4_crypto_sve" => get_set("aarch64", "armv8.4-a+crypto+sve"), + "a64fx" => get_set("aarch64", "a64fx"), + "apple_m1" => get_set("aarch64", "apple_m1"), ], "powerpc64le" => [ "power8" => get_set("powerpc64le", "power8"), diff --git a/base/cpuid.jl b/base/cpuid.jl index b1fb82cf86dae..48930d8064ba9 100644 --- a/base/cpuid.jl +++ b/base/cpuid.jl @@ -56,9 +56,10 @@ const ISAs_by_family = Dict( "aarch64" => [ # Implicit in all sets, because always required: fp, asimd "armv8.0-a" => ISA(Set{UInt32}()), - "armv8.1-a" => ISA(Set((JL_AArch64_lse, JL_AArch64_crc, JL_AArch64_rdm))), - "armv8.2-a+crypto" => ISA(Set((JL_AArch64_lse, JL_AArch64_crc, JL_AArch64_rdm, JL_AArch64_aes, JL_AArch64_sha2))), - "armv8.4-a+crypto+sve" => ISA(Set((JL_AArch64_lse, JL_AArch64_crc, JL_AArch64_rdm, JL_AArch64_fp16fml, JL_AArch64_aes, JL_AArch64_sha2, JL_AArch64_dotprod, JL_AArch64_sve))), + "armv8.1-a" => ISA(Set((JL_AArch64_v8_1a, JL_AArch64_lse, JL_AArch64_crc, JL_AArch64_rdm))), + "armv8.2-a+crypto" => ISA(Set((JL_AArch64_v8_2a, JL_AArch64_lse, JL_AArch64_crc, JL_AArch64_rdm, JL_AArch64_aes, JL_AArch64_sha2))), + "a64fx" => ISA(Set((JL_AArch64_v8_2a, JL_AArch64_lse, JL_AArch64_crc, JL_AArch64_rdm, JL_AArch64_sha2, JL_AArch64_ccpp, JL_AArch64_complxnum, JL_AArch64_fullfp16, JL_AArch64_sve))), + "apple_m1" => ISA(Set((JL_AArch64_v8_5a, JL_AArch64_lse, JL_AArch64_crc, JL_AArch64_rdm, JL_AArch64_aes, JL_AArch64_sha2, JL_AArch64_sha3, JL_AArch64_ccpp, JL_AArch64_complxnum, JL_AArch64_fp16fml, JL_AArch64_fullfp16, JL_AArch64_dotprod, JL_AArch64_rcpc, JL_AArch64_altnzcv))), ], "powerpc64le" => [ # We have no way to test powerpc64le features yet, so we're only going to declare the lowest ISA: @@ -88,14 +89,27 @@ function normalize_arch(arch::String) return arch end +let + # Collect all relevant features for the current architecture, if any. + FEATURES = UInt32[] + arch = normalize_arch(String(Sys.ARCH)) + if arch in keys(ISAs_by_family) + for isa in ISAs_by_family[arch] + unique!(append!(FEATURES, last(isa).features)) + end + end + + # Use `@eval` to inline the list of features. + @eval function cpu_isa() + return ISA(Set{UInt32}(feat for feat in $(FEATURES) if test_cpu_feature(feat))) + end +end + """ cpu_isa() Return the [`ISA`](@ref) (instruction set architecture) of the current CPU. """ -function cpu_isa() - all_features = last(last(get(ISAs_by_family, normalize_arch(String(Sys.ARCH)), "" => [ISA(Set{UInt32}())]))).features - return ISA(Set{UInt32}(feat for feat in all_features if test_cpu_feature(feat))) -end +cpu_isa end # module CPUID From d19bc3fae825d5f6fb89378e4512be8878f1c102 Mon Sep 17 00:00:00 2001 From: Aditya Puranik <7466364+Ellipse0934@users.noreply.github.com> Date: Mon, 21 Feb 2022 15:17:52 +0530 Subject: [PATCH 14/40] Fix aliasing bug in copy!(x, x) for x::AbstractSet and x::AbstractDict, fixes #41268 (#44265) (cherry picked from commit 0b48b91c9881823d860eaf0a605072b7f20a4cbb) --- base/abstractdict.jl | 5 ++++- base/abstractset.jl | 5 ++++- test/dict.jl | 2 ++ test/sets.jl | 3 +++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/base/abstractdict.jl b/base/abstractdict.jl index 4304a13e71a66..0891b3ec769ef 100644 --- a/base/abstractdict.jl +++ b/base/abstractdict.jl @@ -155,7 +155,10 @@ empty(a::AbstractDict) = empty(a, keytype(a), valtype(a)) empty(a::AbstractDict, ::Type{V}) where {V} = empty(a, keytype(a), V) # Note: this is the form which makes sense for `Vector`. copy(a::AbstractDict) = merge!(empty(a), a) -copy!(dst::AbstractDict, src::AbstractDict) = merge!(empty!(dst), src) +function copy!(dst::AbstractDict, src::AbstractDict) + dst === src && return dst + merge!(empty!(dst), src) +end """ merge!(d::AbstractDict, others::AbstractDict...) diff --git a/base/abstractset.jl b/base/abstractset.jl index 442bbcb4bff48..8b881d446a346 100644 --- a/base/abstractset.jl +++ b/base/abstractset.jl @@ -3,7 +3,10 @@ eltype(::Type{<:AbstractSet{T}}) where {T} = @isdefined(T) ? T : Any sizehint!(s::AbstractSet, n) = nothing -copy!(dst::AbstractSet, src::AbstractSet) = union!(empty!(dst), src) +function copy!(dst::AbstractSet, src::AbstractSet) + dst === src && return dst + union!(empty!(dst), src) +end ## set operations (union, intersection, symmetric difference) diff --git a/test/dict.jl b/test/dict.jl index cbbb475c993fd..ad15764a09d16 100644 --- a/test/dict.jl +++ b/test/dict.jl @@ -1179,6 +1179,8 @@ end @test s === copy!(s, Base.ImmutableDict(a[])) == Dict(a[]) end end + s2 = copy(s) + @test copy!(s, s) == s2 end @testset "map!(f, values(dict))" begin diff --git a/test/sets.jl b/test/sets.jl index 5de38e96b9e31..cc24087f7e3c9 100644 --- a/test/sets.jl +++ b/test/sets.jl @@ -147,6 +147,9 @@ end @test s === copy!(s, BitSet(a)) == S(a) end end + s = Set([1, 2]) + s2 = copy(s) + @test copy!(s, s) == s2 end @testset "sizehint, empty" begin From e4e5b2d451e0f8d249df4ebd969eefda61fcd554 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Fri, 18 Feb 2022 16:32:57 -0500 Subject: [PATCH 15/40] fix bug in `addenv` for environment entries with embedded `=` (#44212) Co-authored-by: Jameson Nash Co-authored-by: Fredrik Ekre (cherry picked from commit f5d9b86cfd19e39ceedf6056ef72cc2071c7478c) --- base/cmd.jl | 13 +++++++++++-- test/spawn.jl | 6 ++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/base/cmd.jl b/base/cmd.jl index 7d079e5efb986..ba04928e1d259 100644 --- a/base/cmd.jl +++ b/base/cmd.jl @@ -249,6 +249,15 @@ setenv(cmd::Cmd, env::Pair{<:AbstractString}...; dir=cmd.dir) = setenv(cmd, env; dir=dir) setenv(cmd::Cmd; dir=cmd.dir) = Cmd(cmd; dir=dir) +# split environment entry string into before and after first `=` (key and value) +function splitenv(e::String) + i = findnext('=', e, 2) + if i === nothing + throw(ArgumentError("malformed environment entry")) + end + e[1:prevind(e, i)], e[nextind(e, i):end] +end + """ addenv(command::Cmd, env...; inherit::Bool = true) @@ -268,7 +277,7 @@ function addenv(cmd::Cmd, env::Dict; inherit::Bool = true) merge!(new_env, ENV) end else - for (k, v) in split.(cmd.env, "=") + for (k, v) in splitenv.(cmd.env) new_env[string(k)::String] = string(v)::String end end @@ -283,7 +292,7 @@ function addenv(cmd::Cmd, pairs::Pair{<:AbstractString}...; inherit::Bool = true end function addenv(cmd::Cmd, env::Vector{<:AbstractString}; inherit::Bool = true) - return addenv(cmd, Dict(k => v for (k, v) in split.(env, "=")); inherit) + return addenv(cmd, Dict(k => v for (k, v) in splitenv.(env)); inherit) end (&)(left::AbstractCmd, right::AbstractCmd) = AndCmds(left, right) diff --git a/test/spawn.jl b/test/spawn.jl index 24cd6dad1fa1d..2206cbfeb0e5a 100644 --- a/test/spawn.jl +++ b/test/spawn.jl @@ -803,6 +803,12 @@ end cmd2 = addenv(cmd, "FOO" => "foo2", "BAR" => "bar"; inherit=true) @test strip(String(read(cmd2))) == "foo2 bar" end + + @test addenv(``, ["a=b=c"], inherit=false).env == ["a=b=c"] + cmd = addenv(``, "a"=>"b=c", inherit=false) + @test cmd.env == ["a=b=c"] + cmd = addenv(cmd, "b"=>"b") + @test issetequal(cmd.env, ["b=b", "a=b=c"]) end @testset "setenv with dir (with tests for #42131)" begin From f9f2300e6633b94c88887d874fe72d9199b165bb Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Wed, 2 Feb 2022 23:21:15 -0500 Subject: [PATCH 16/40] fix #44013: aliasing in property destructuring (#44020) (cherry picked from commit 60a811cb8b7c99b4908b7464f188d48fbcaa9b45) --- src/julia-syntax.scm | 32 ++++++++++++++++++-------------- test/syntax.jl | 19 +++++++++++++++++++ 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/src/julia-syntax.scm b/src/julia-syntax.scm index cfccc6da02088..d1f681479bc55 100644 --- a/src/julia-syntax.scm +++ b/src/julia-syntax.scm @@ -2105,11 +2105,21 @@ `(call ,@hvncat ,dims ,(tf is-row-first) ,@aflat)) `(call ,@hvncat ,(tuplize shape) ,(tf is-row-first) ,@aflat)))))))) -(define (expand-property-destruct lhss x) - (if (not (length= lhss 1)) - (error (string "invalid assignment location \"" (deparse lhs) "\""))) - (let* ((xx (if (symbol-like? x) x (make-ssavalue))) - (ini (if (eq? x xx) '() (list (sink-assignment xx (expand-forms x)))))) +(define (maybe-ssavalue lhss x in-lhs?) + (cond ((or (and (not (in-lhs? x lhss)) (symbol? x)) + (ssavalue? x)) + x) + ((and (pair? lhss) (vararg? (last lhss)) + (eventually-call? (cadr (last lhss)))) + (gensy)) + (else (make-ssavalue)))) + +(define (expand-property-destruct lhs x) + (if (not (length= lhs 1)) + (error (string "invalid assignment location \"" (deparse `(tuple ,lhs)) "\""))) + (let* ((lhss (cdar lhs)) + (xx (maybe-ssavalue lhss x memq)) + (ini (if (eq? x xx) '() (list (sink-assignment xx (expand-forms x)))))) `(block ,@ini ,@(map @@ -2118,9 +2128,9 @@ ((and (pair? field) (eq? (car field) '|::|) (symbol? (cadr field))) (cadr field)) (else - (error (string "invalid assignment location \"" (deparse lhs) "\"")))))) + (error (string "invalid assignment location \"" (deparse `(tuple ,lhs)) "\"")))))) (expand-forms `(= ,field (call (top getproperty) ,xx (quote ,prop)))))) - (cdar lhss)) + lhss) (unnecessary ,xx)))) (define (expand-tuple-destruct lhss x) @@ -2153,13 +2163,7 @@ ((eq? l x) #t) (else (in-lhs? x (cdr lhss))))))) ;; in-lhs? also checks for invalid syntax, so always call it first - (let* ((xx (cond ((or (and (not (in-lhs? x lhss)) (symbol? x)) - (ssavalue? x)) - x) - ((and (pair? lhss) (vararg? (last lhss)) - (eventually-call? (cadr (last lhss)))) - (gensy)) - (else (make-ssavalue)))) + (let* ((xx (maybe-ssavalue lhss x in-lhs?)) (ini (if (eq? x xx) '() (list (sink-assignment xx (expand-forms x))))) (n (length lhss)) ;; skip last assignment if it is an all-underscore vararg diff --git a/test/syntax.jl b/test/syntax.jl index 803d092270ee3..f8a2d18021b63 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -3012,3 +3012,22 @@ end @generated g25678(x) = return :x @test g25678(7) === 7 + +struct Foo44013 + x + f +end + +@testset "issue #44013" begin + f = Foo44013(1, 2) + res = begin (; x, f) = f end + @test res == Foo44013(1, 2) + @test x == 1 + @test f == 2 + + f = Foo44013(1, 2) + res = begin (; f, x) = f end + @test res == Foo44013(1, 2) + @test x == 1 + @test f == 2 +end From aa1f18f0b5585d516b2a2943e2a774eb6c2b0637 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 11 Feb 2022 17:22:19 -0500 Subject: [PATCH 17/40] build,win: workaround for echo sometimes interpreting \\ from tr (cherry picked from commit 0c44d238e8abff11916af336c3c3013ca2d5fd3b) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ec308a74f6e27..a6def422f9938 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ $(BUILDROOT)/doc/_build/html/en/index.html: $(shell find $(BUILDROOT)/base $(BUI julia-symlink: julia-cli-$(JULIA_BUILD_MODE) ifeq ($(OS),WINNT) - @echo '@"%~dp0\'"$$(echo $(call rel_path,$(BUILDROOT),$(JULIA_EXECUTABLE)) | tr / '\\')"\" '%*' > $(BUILDROOT)/julia.bat + echo '@"%~dp0/'"$$(echo '$(call rel_path,$(BUILDROOT),$(JULIA_EXECUTABLE))')"'" %*' | tr / '\\' > $(BUILDROOT)/julia.bat chmod a+x $(BUILDROOT)/julia.bat else ifndef JULIA_VAGRANT_BUILD From df259f2f63b7da0c4f5b721ef7257793bfb61ac5 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Sat, 12 Feb 2022 23:54:48 -0500 Subject: [PATCH 18/40] win,debug: add missing jl_refresh_dbg_module_list call Because we might not have synchronized the list again yet. (cherry picked from commit cac90b570e73e4e2f726b18a18001344b79f8340) --- src/debuginfo.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/debuginfo.cpp b/src/debuginfo.cpp index fc9bc4535e86a..6c7b3919d4628 100644 --- a/src/debuginfo.cpp +++ b/src/debuginfo.cpp @@ -1131,6 +1131,7 @@ static int jl_getDylibFunctionInfo(jl_frame_t **frames, size_t pointer, int skip static IMAGEHLP_LINE64 frame_info_line; DWORD dwDisplacement = 0; JL_LOCK_NOGC(&jl_in_stackwalk); + jl_refresh_dbg_module_list(); DWORD64 dwAddress = pointer; frame_info_line.SizeOfStruct = sizeof(IMAGEHLP_LINE64); if (SymGetLineFromAddr64(GetCurrentProcess(), dwAddress, &dwDisplacement, &frame_info_line)) { From 713a5b1c0a8a6647cc0d325890d357220993ebfc Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 11 Feb 2022 17:21:17 -0500 Subject: [PATCH 19/40] debuginfo: fix offset to UnwindData on Win64 We have 2 copies of this data, and so need to make sure we are pointing at the correct one for runtime. (cherry picked from commit 2f1f2f6eb6f4060d2e5125c28014cc7c8dc1f740) --- src/cgmemmgr.cpp | 8 +++++--- src/debuginfo.cpp | 23 ++++++++++++----------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/cgmemmgr.cpp b/src/cgmemmgr.cpp index 344f044737f9d..ba1928d18a3ad 100644 --- a/src/cgmemmgr.cpp +++ b/src/cgmemmgr.cpp @@ -64,7 +64,8 @@ static void unmap_page(void *ptr, size_t size) enum class Prot : int { RW = PAGE_READWRITE, RX = PAGE_EXECUTE, - RO = PAGE_READONLY + RO = PAGE_READONLY, + NO = PAGE_NOACCESS }; static void protect_page(void *ptr, size_t size, Prot flags) @@ -81,7 +82,8 @@ static void protect_page(void *ptr, size_t size, Prot flags) enum class Prot : int { RW = PROT_READ | PROT_WRITE, RX = PROT_READ | PROT_EXEC, - RO = PROT_READ + RO = PROT_READ, + NO = PROT_NONE }; static void protect_page(void *ptr, size_t size, Prot flags) @@ -640,7 +642,7 @@ class DualMapAllocator : public ROAllocator { unmap_page((void*)block.wr_ptr, block.total); } else { - protect_page((void*)block.wr_ptr, block.total, Prot::RO); + protect_page((void*)block.wr_ptr, block.total, Prot::NO); block.state = SplitPtrBlock::WRInit; } } diff --git a/src/debuginfo.cpp b/src/debuginfo.cpp index 6c7b3919d4628..dcfe9405762cc 100644 --- a/src/debuginfo.cpp +++ b/src/debuginfo.cpp @@ -131,6 +131,8 @@ static void create_PRUNTIME_FUNCTION(uint8_t *Code, size_t Size, StringRef fnnam tbl->BeginAddress = (DWORD)(Code - Section); tbl->EndAddress = (DWORD)(Code - Section + Size); tbl->UnwindData = (DWORD)(UnwindData - Section); + assert(Code >= Section && Code + Size <= Section + Allocated); + assert(UnwindData >= Section && UnwindData <= Section + Allocated); #else // defined(_CPU_X86_64_) Section += (uintptr_t)Code; mod_size = Size; @@ -306,20 +308,13 @@ class JuliaJITEventListener: public JITEventListener uint8_t *catchjmp = NULL; for (const object::SymbolRef &sym_iter : debugObj.symbols()) { StringRef sName = cantFail(sym_iter.getName()); - uint8_t **pAddr = NULL; - if (sName.equals("__UnwindData")) { - pAddr = &UnwindData; - } - else if (sName.equals("__catchjmp")) { - pAddr = &catchjmp; - } - if (pAddr) { + if (sName.equals("__UnwindData") || sName.equals("__catchjmp")) { uint64_t Addr = cantFail(sym_iter.getAddress()); auto Section = cantFail(sym_iter.getSection()); assert(Section != EndSection && Section->isText()); uint64_t SectionAddr = Section->getAddress(); - sName = cantFail(Section->getName()); - uint64_t SectionLoadAddr = getLoadAddress(sName); + StringRef secName = cantFail(Section->getName()); + uint64_t SectionLoadAddr = getLoadAddress(secName); assert(SectionLoadAddr); if (SectionAddrCheck) // assert that all of the Sections are at the same location assert(SectionAddrCheck == SectionAddr && @@ -331,7 +326,12 @@ class JuliaJITEventListener: public JITEventListener SectionWriteCheck = (uintptr_t)lookupWriteAddressFor(memmgr, (void*)SectionLoadAddr); Addr += SectionWriteCheck - SectionLoadAddr; - *pAddr = (uint8_t*)Addr; + if (sName.equals("__UnwindData")) { + UnwindData = (uint8_t*)Addr; + } + else if (sName.equals("__catchjmp")) { + catchjmp = (uint8_t*)Addr; + } } } assert(catchjmp); @@ -354,6 +354,7 @@ class JuliaJITEventListener: public JITEventListener UnwindData[6] = 1; // first instruction UnwindData[7] = 0x50; // push RBP *(DWORD*)&UnwindData[8] = (DWORD)(catchjmp - (uint8_t*)SectionWriteCheck); // relative location of catchjmp + UnwindData -= SectionWriteCheck - SectionLoadCheck; #endif // defined(_OS_X86_64_) #endif // defined(_OS_WINDOWS_) From 1961a6a97e8ccee3cbc573cb3edec8a88abd86ae Mon Sep 17 00:00:00 2001 From: Eric Hanson <5846501+ericphanson@users.noreply.github.com> Date: Sun, 6 Mar 2022 08:17:18 -0500 Subject: [PATCH 20/40] update downloads version (#44433) --- .../md5 | 1 - .../sha512 | 1 - .../md5 | 1 + .../sha512 | 1 + stdlib/Downloads.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 deps/checksums/Downloads-26d79afcde9cf837a331fce023b31f1d3699700c.tar.gz/md5 delete mode 100644 deps/checksums/Downloads-26d79afcde9cf837a331fce023b31f1d3699700c.tar.gz/sha512 create mode 100644 deps/checksums/Downloads-b0f23d0ed40cf7c5c5896f957d8163a68dfbc805.tar.gz/md5 create mode 100644 deps/checksums/Downloads-b0f23d0ed40cf7c5c5896f957d8163a68dfbc805.tar.gz/sha512 diff --git a/deps/checksums/Downloads-26d79afcde9cf837a331fce023b31f1d3699700c.tar.gz/md5 b/deps/checksums/Downloads-26d79afcde9cf837a331fce023b31f1d3699700c.tar.gz/md5 deleted file mode 100644 index 02c7e0f4915d1..0000000000000 --- a/deps/checksums/Downloads-26d79afcde9cf837a331fce023b31f1d3699700c.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -2265854c26d1ff5a061ef9033eb3b9d4 diff --git a/deps/checksums/Downloads-26d79afcde9cf837a331fce023b31f1d3699700c.tar.gz/sha512 b/deps/checksums/Downloads-26d79afcde9cf837a331fce023b31f1d3699700c.tar.gz/sha512 deleted file mode 100644 index 19d71e70f6b23..0000000000000 --- a/deps/checksums/Downloads-26d79afcde9cf837a331fce023b31f1d3699700c.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -7817f2ab0ccd3224420e65ae7525c2a801f0dbd7e5986e3a0eeac29e3842ea94933e494b895a78e0495ab1188a7375cd98033f507d270aea38eeeb5532226873 diff --git a/deps/checksums/Downloads-b0f23d0ed40cf7c5c5896f957d8163a68dfbc805.tar.gz/md5 b/deps/checksums/Downloads-b0f23d0ed40cf7c5c5896f957d8163a68dfbc805.tar.gz/md5 new file mode 100644 index 0000000000000..4225609942997 --- /dev/null +++ b/deps/checksums/Downloads-b0f23d0ed40cf7c5c5896f957d8163a68dfbc805.tar.gz/md5 @@ -0,0 +1 @@ +f411897bad029e55293be60808dcddd3 diff --git a/deps/checksums/Downloads-b0f23d0ed40cf7c5c5896f957d8163a68dfbc805.tar.gz/sha512 b/deps/checksums/Downloads-b0f23d0ed40cf7c5c5896f957d8163a68dfbc805.tar.gz/sha512 new file mode 100644 index 0000000000000..b7bae92969a8e --- /dev/null +++ b/deps/checksums/Downloads-b0f23d0ed40cf7c5c5896f957d8163a68dfbc805.tar.gz/sha512 @@ -0,0 +1 @@ +6e9f2468758c5d1e47abe27d95e5ad8531b39b7829be5c168111838d6c97f2fe807574d15dd67c6d81e5bcf0f99116b945d2e513170eedd3a1ffe2ba6c4d88c3 diff --git a/stdlib/Downloads.version b/stdlib/Downloads.version index 056fc38d8254a..87c1241d234f5 100644 --- a/stdlib/Downloads.version +++ b/stdlib/Downloads.version @@ -1,4 +1,4 @@ DOWNLOADS_BRANCH = release-1.5 -DOWNLOADS_SHA1 = 26d79afcde9cf837a331fce023b31f1d3699700c +DOWNLOADS_SHA1 = b0f23d0ed40cf7c5c5896f957d8163a68dfbc805 DOWNLOADS_GIT_URL := git://github.com/JuliaLang/Downloads.jl.git DOWNLOADS_TAR_URL = https://api.github.com/repos/JuliaLang/Downloads.jl/tarball/$1 From c3a63eddeda10cd2e6e6da937e84d9b8a6b0aad1 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Thu, 24 Feb 2022 17:08:37 -0500 Subject: [PATCH 21/40] fix #43411, wrapped `NamedTuple` can be bitstype more often (#44311) (cherry picked from commit f20d5de466def02ec88e2889e80e24e736b0ade4) --- src/jltypes.c | 2 ++ test/core.jl | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/jltypes.c b/src/jltypes.c index f721e7fe3f466..ba5aa57a166bf 100644 --- a/src/jltypes.c +++ b/src/jltypes.c @@ -61,6 +61,8 @@ static int layout_uses_free_typevars(jl_value_t *v, jl_typeenv_t *env) jl_datatype_t *dt = (jl_datatype_t*)v; if (dt->layout || dt->isconcretetype || !dt->name->mayinlinealloc) return 0; + if (dt->name == jl_namedtuple_typename) + return layout_uses_free_typevars(jl_tparam0(dt), env) || layout_uses_free_typevars(jl_tparam1(dt), env); jl_svec_t *types = jl_get_fieldtypes(dt); size_t i, l = jl_svec_len(types); for (i = 0; i < l; i++) { diff --git a/test/core.jl b/test/core.jl index 3561762023ab8..456b50137f876 100644 --- a/test/core.jl +++ b/test/core.jl @@ -7241,6 +7241,12 @@ end @test isbitstype(X41654) @test ('a'=>X41654(),)[1][2] isa X41654 +# issue #43411 +struct A43411{S, T} + x::NamedTuple{S, T} +end +@test isbitstype(A43411{(:a,), Tuple{Int}}) + # Issue #34206/34207 function mre34206(a, n) va = view(a, :) From aa4b9290fefa24aa86e468f55809b017b83f534f Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Thu, 24 Feb 2022 14:52:14 -0800 Subject: [PATCH 22/40] [macOS] Codesign binary-dist tarballs (#44305) Because we're starting to distribute macOS tarballs as well, let's codesign them by default, when possible. (cherry picked from commit 6b29ebda35b6c844198c5d1533587711a6700df2) --- Makefile | 12 ++++++++++++ contrib/mac/app/Makefile | 3 +++ 2 files changed, 15 insertions(+) diff --git a/Makefile b/Makefile index a6def422f9938..c76517d92c761 100644 --- a/Makefile +++ b/Makefile @@ -431,9 +431,21 @@ ifeq ($(OS), Linux) endif ifeq ($(OS), WINNT) cd $(BUILDROOT)/julia-$(JULIA_COMMIT)/bin && rm -f llvm* llc.exe lli.exe opt.exe LTO.dll bugpoint.exe macho-dump.exe +endif + # If we're on macOS, and we have a codesigning identity, then codesign the binary-dist tarball! +ifeq ($(OS),Darwin) +ifneq ($(MACOS_CODESIGN_IDENTITY),) + echo "Codesigning with identity $(MACOS_CODESIGN_IDENTITY)"; \ + MACHO_FILES=$$(find "$(BUILDROOT)/julia-$(JULIA_COMMIT)" -type f -perm -0111 | cut -d: -f1); \ + for f in $${MACHO_FILES}; do \ + echo "Codesigning $${f}..."; \ + codesign -s "$(MACOS_CODESIGN_IDENTITY)" --option=runtime --entitlements $(JULIAHOME)/contrib/mac/app/Entitlements.plist -vvv --timestamp --deep --force "$${f}"; \ + done +endif endif cd $(BUILDROOT) && $(TAR) zcvf $(JULIA_BINARYDIST_FILENAME).tar.gz julia-$(JULIA_COMMIT) + exe: # run Inno Setup to compile installer $(call spawn,$(JULIAHOME)/dist-extras/inno/iscc.exe /DAppVersion=$(JULIA_VERSION) /DSourceDir="$(call cygpath_w,$(BUILDROOT)/julia-$(JULIA_COMMIT))" /DRepoDir="$(call cygpath_w,$(JULIAHOME))" /F"$(JULIA_BINARYDIST_FILENAME)" /O"$(call cygpath_w,$(BUILDROOT))" $(INNO_ARGS) $(call cygpath_w,$(JULIAHOME)/contrib/windows/build-installer.iss)) diff --git a/contrib/mac/app/Makefile b/contrib/mac/app/Makefile index edb6f868c9486..81b7e47cdf2cf 100644 --- a/contrib/mac/app/Makefile +++ b/contrib/mac/app/Makefile @@ -50,6 +50,9 @@ dmg/$(APP_NAME): startup.applescript julia.icns make -C $(JULIAHOME) binary-dist tar zxf $(JULIAHOME)/$(JULIA_BINARYDIST_FILENAME).tar.gz -C $@/Contents/Resources/julia --strip-components 1 find $@/Contents/Resources/julia -type f -exec chmod -w {} \; + # Even though the tarball may already be signed, we re-sign here to make it easier to add + # unsigned executables (like the app launcher) and whatnot, without needing to maintain lists + # of what is or is not signed. Codesigning is cheap, so might as well do it early and often. if [ -n "$$MACOS_CODESIGN_IDENTITY" ]; then \ echo "Codesigning with identity $$MACOS_CODESIGN_IDENTITY"; \ MACHO_FILES=$$(find "$@" -type f -perm -0111 | cut -d: -f1); \ From bf3e57de6c4e24617bd8aed5b26bd0c8913214bc Mon Sep 17 00:00:00 2001 From: Yichao Yu Date: Fri, 25 Feb 2022 09:48:24 -0500 Subject: [PATCH 23/40] Make sure all the relocations are filled in for partially cloned target (#44262) We collect the relocations (i.e. the GOT slots that is used in the code) for each target in `tgt.relocs`. Needing a relocation, however, does not imply that the function is cloned for this target within the group (It does mean that at least one target in the group has it cloned). The previous version would miss the relocation in this case. This was triggerred with the following cloning situation caller: clone_1 callee: clone_1, clone_1.clone_3 Since caller.clone_1 may call either callee.clone_1 or callee.clone_1.clone_3 a relocation for callee will be used and is required to be initialized. In addition to target 1, target 2 (and in fact target 3) within group 1 will also use caller.clone_1. However, since callee isn't cloned for target 2 the previous version wouldn't have saved this slot in the relocation array. (cherry picked from commit 76fc067185ce7737247122b5a1781f079a8f0711) --- src/llvm-multiversioning.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/llvm-multiversioning.cpp b/src/llvm-multiversioning.cpp index 68081eb53d3a5..3fcd241c14088 100644 --- a/src/llvm-multiversioning.cpp +++ b/src/llvm-multiversioning.cpp @@ -992,7 +992,7 @@ void CloneCtx::emit_metadata() idxs.push_back(baseidx); for (uint32_t j = 0; j < nfvars; j++) { auto base_f = grp->base_func(fvars[j]); - if (shared_relocs.count(j)) { + if (shared_relocs.count(j) || tgt->relocs.count(j)) { count++; idxs.push_back(jl_sysimg_tag_mask | j); auto f = map_get(*tgt->vmap, base_f, base_f); @@ -1000,7 +1000,7 @@ void CloneCtx::emit_metadata() } else if (auto f = map_get(*tgt->vmap, base_f)) { count++; - idxs.push_back(tgt->relocs.count(j) ? (jl_sysimg_tag_mask | j) : j); + idxs.push_back(j); offsets.push_back(get_ptrdiff32(cast(f), fbase)); } } From e9e545052f74f6f30bc9309be8873358e0c200b2 Mon Sep 17 00:00:00 2001 From: Paul Berg Date: Mon, 28 Feb 2022 02:32:35 +0100 Subject: [PATCH 24/40] use name in source module when importing an aliased binding (#43291) Co-authored-by: Simeon David Schaub (cherry picked from commit 2338f5d3040ced10d69f4d15cca5fdca03364d9a) --- src/module.c | 2 +- test/syntax.jl | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/module.c b/src/module.c index fcd4b29e63a5b..fdab2e8fb2d50 100644 --- a/src/module.c +++ b/src/module.c @@ -490,7 +490,7 @@ static void module_import_(jl_module_t *to, jl_module_t *from, jl_sym_t *s, jl_s } } else { - jl_binding_t *nb = new_binding(s); + jl_binding_t *nb = new_binding(b->name); nb->owner = b->owner; nb->imported = (explici!=0); nb->deprecated = b->deprecated; diff --git a/test/syntax.jl b/test/syntax.jl index f8a2d18021b63..28dac53036a98 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -2493,6 +2493,7 @@ end end module Mod2 +import ..Mod.x as x_from_mod const y = 2 end @@ -2533,6 +2534,11 @@ import .Mod.@mac as @m @test_throws ErrorException eval(:(import .Mod.func as @notmacro)) @test_throws ErrorException eval(:(using .Mod: @mac as notmacro)) @test_throws ErrorException eval(:(using .Mod: func as @notmacro)) + +import .Mod2.x_from_mod + +@test @isdefined(x_from_mod) +@test x_from_mod == Mod.x end import .TestImportAs.Mod2 as M2 From 6918fc42a08db5362464a31e826e939a931e94ec Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Sun, 6 Mar 2022 00:02:44 -0500 Subject: [PATCH 25/40] [RemoveAddrspaces] make MappedTypes non-static (#44453) (cherry picked from commit 610fc20640b93c5a41bbedc3483a031886e983e7) --- src/llvm-remove-addrspaces.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/llvm-remove-addrspaces.cpp b/src/llvm-remove-addrspaces.cpp index c3fbe84d0bf60..ee86918d1ceb4 100644 --- a/src/llvm-remove-addrspaces.cpp +++ b/src/llvm-remove-addrspaces.cpp @@ -105,10 +105,9 @@ class AddrspaceRemoveTypeRemapper : public ValueMapTypeRemapper { } private: - static DenseMap MappedTypes; + DenseMap MappedTypes; }; -DenseMap AddrspaceRemoveTypeRemapper::MappedTypes; class AddrspaceRemoveValueMaterializer : public ValueMaterializer { ValueToValueMapTy &VM; From b3c4075a7ecb7b4c6bbd7cbe889f9b28837ad617 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Tue, 8 Mar 2022 15:31:54 -0500 Subject: [PATCH 26/40] ensure invoke kwargs work on Types (#44464) Fix #44227 (cherry picked from commit f731c38bf84604443f0760b114957e40f2b10fa2) --- src/builtins.c | 4 ++-- test/core.jl | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/builtins.c b/src/builtins.c index 126b96ef44ebc..5114f2a44b61e 100644 --- a/src/builtins.c +++ b/src/builtins.c @@ -1243,7 +1243,7 @@ JL_CALLABLE(jl_f_invoke_kwsorter) if (nt < jl_page_size/sizeof(jl_value_t*)) { jl_value_t **types = (jl_value_t**)alloca(nt*sizeof(jl_value_t*)); types[0] = (jl_value_t*)jl_namedtuple_type; - types[1] = jl_typeof(func); + types[1] = jl_is_type(func) ? (jl_value_t*)jl_wrap_Type(func) : jl_typeof(func); for (i = 2; i < nt; i++) types[i] = jl_tparam(argtypes, i - 2); argtypes = (jl_value_t*)jl_apply_tuple_type_v(types, nt); @@ -1252,7 +1252,7 @@ JL_CALLABLE(jl_f_invoke_kwsorter) jl_svec_t *types = jl_alloc_svec_uninit(nt); JL_GC_PUSH1(&types); jl_svecset(types, 0, jl_namedtuple_type); - jl_svecset(types, 1, jl_typeof(func)); + jl_svecset(types, 1, jl_is_type(func) ? (jl_value_t*)jl_wrap_Type(func) : jl_typeof(func)); for (i = 2; i < nt; i++) jl_svecset(types, i, jl_tparam(argtypes, i - 2)); argtypes = (jl_value_t*)jl_apply_tuple_type(types); diff --git a/test/core.jl b/test/core.jl index 456b50137f876..e44b3c3be38cb 100644 --- a/test/core.jl +++ b/test/core.jl @@ -1441,6 +1441,12 @@ let @test invoke(i2169, Tuple{Array}, Int8[1]) === Int8(-128) end +# issue #44227 +struct F{T} end +F{Int32}(; y=1) = 1 +F{Int64}(; y=1) = invoke(F{Int32}, Tuple{}; y) +@test F{Int64}() === 1 + # issue #2365 mutable struct B2365{T} v::Union{T, Nothing} From abaa0ede16deaf49ec91235d8034020dcea61660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Wed, 9 Mar 2022 01:44:19 +0000 Subject: [PATCH 27/40] [CompilerSupportLibraries_jll] Update to v0.5.2 (#44487) The main difference since previous version should be the libraries for aarch64-apple-darwin, which are based on a more recent version of the GCC fork for this platform. There are a couple of notable ABI changes here: * `libgcc_s` is now called `libgcc_s.1.1.dylib` instead of `libgcc_s.2.dylib` * there is now `libquadmath.0.dylib` for this platform, which was missing before. (cherry picked from commit cb2fa5d8483906f6e4c3b47f975e1c5ee2819d04) --- Make.inc | 4 +- base/Makefile | 4 + deps/checksums/compilersupportlibraries | 184 +++++++++--------- .../CompilerSupportLibraries_jll/Project.toml | 2 +- .../src/CompilerSupportLibraries_jll.jl | 2 +- 5 files changed, 100 insertions(+), 96 deletions(-) diff --git a/Make.inc b/Make.inc index 996e53ebf8e7d..700fb48fae627 100644 --- a/Make.inc +++ b/Make.inc @@ -1,4 +1,4 @@ -# -*- mode: makefile-gmake -*- +# -*- mode: makefile -*- # vi:syntax=make ## Note: @@ -1507,7 +1507,7 @@ endif endif ifeq ($(OS),Darwin) ifeq ($(ARCH),aarch64) -LIBGCC_NAME := libgcc_s.2.$(SHLIB_EXT) +LIBGCC_NAME := libgcc_s.1.1.$(SHLIB_EXT) else LIBGCC_NAME := libgcc_s.1.$(SHLIB_EXT) endif diff --git a/base/Makefile b/base/Makefile index 82954b85c348e..78bc464d352c9 100644 --- a/base/Makefile +++ b/base/Makefile @@ -206,7 +206,11 @@ else ifneq ($(USE_SYSTEM_OPENLIBM),0) $(eval $(call symlink_system_library,OPENLIBM,$(LIBMNAME))) endif +ifeq ($(APPLE_ARCH),arm64) +$(eval $(call symlink_system_library,CSL,libgcc_s,1.1)) +else $(eval $(call symlink_system_library,CSL,libgcc_s,1)) +endif ifneq (,$(LIBGFORTRAN_VERSION)) $(eval $(call symlink_system_library,CSL,libgfortran,$(LIBGFORTRAN_VERSION))) endif diff --git a/deps/checksums/compilersupportlibraries b/deps/checksums/compilersupportlibraries index e351d100cb481..86250fdc63390 100644 --- a/deps/checksums/compilersupportlibraries +++ b/deps/checksums/compilersupportlibraries @@ -1,92 +1,92 @@ -CompilerSupportLibraries.v0.5.0+0.aarch64-apple-darwin-libgfortran5.tar.gz/md5/307711def378e337a999c182aa7e07d8 -CompilerSupportLibraries.v0.5.0+0.aarch64-apple-darwin-libgfortran5.tar.gz/sha512/0dcad5e315e045397320f667b27fc378da898ebfea9b55a2837e68b29434fe2c2ddc9652cc75a4551062ce70a2bfaffa8223c77398aa41fe1a73ccb44952cd8f -CompilerSupportLibraries.v0.5.0+0.aarch64-linux-gnu-libgfortran3.tar.gz/md5/177f2665038919c3f8ed968226ff3b56 -CompilerSupportLibraries.v0.5.0+0.aarch64-linux-gnu-libgfortran3.tar.gz/sha512/ea67c3b9986106aee12e5f22ab3d3c5d71a58759a7d20a7724bbb198e5c71f42fa2034e46f3147006a2d2277b3881f0546030d1040cb9393e58eeae87eb82c4d -CompilerSupportLibraries.v0.5.0+0.aarch64-linux-gnu-libgfortran4.tar.gz/md5/f16db35be9018a5c61eaafaaf7226d10 -CompilerSupportLibraries.v0.5.0+0.aarch64-linux-gnu-libgfortran4.tar.gz/sha512/051b5a0dd2235eaa90557e487c83499b3d7e0b9e921f7b2f14e77c81152c338acd5bac8040bdf6679db656cd8039093db43565f843dede253717425e464e61b0 -CompilerSupportLibraries.v0.5.0+0.aarch64-linux-gnu-libgfortran5.tar.gz/md5/e6082f3e46b627fdaef09f1ef81c1d7b -CompilerSupportLibraries.v0.5.0+0.aarch64-linux-gnu-libgfortran5.tar.gz/sha512/13d0ab1c0e84a65db729ea6bd45a868d9d65e1a0ec95412448846d1044e2bbf11b11d96cfa576dccf3d7eccc4bed4eb9ae4bac0989e9b1b97adad5e404dfe4a4 -CompilerSupportLibraries.v0.5.0+0.aarch64-linux-musl-libgfortran3.tar.gz/md5/00703177897f8c46a577c2b0518432bc -CompilerSupportLibraries.v0.5.0+0.aarch64-linux-musl-libgfortran3.tar.gz/sha512/af14ad1303f3918dd691e0b509ea0fd52ac7c9f0c285e8dbb741bd34ce0b1927f89f219fcf8d260315c503b18bf98b3df117810328066a9964917cc34968ce98 -CompilerSupportLibraries.v0.5.0+0.aarch64-linux-musl-libgfortran4.tar.gz/md5/f823b692319cd370ca59189ad2ba4a3d -CompilerSupportLibraries.v0.5.0+0.aarch64-linux-musl-libgfortran4.tar.gz/sha512/b0c4131bf4d15c482bbed83fcc570da2f7bb8ef99d507e0e13eb0c8f5519ec73ff234c58d505294be3f8d39b6dd1c7022578db02005ae111c7873243e8ddc8ef -CompilerSupportLibraries.v0.5.0+0.aarch64-linux-musl-libgfortran5.tar.gz/md5/a9ef1a68518058fe6c945e8b00f8400f -CompilerSupportLibraries.v0.5.0+0.aarch64-linux-musl-libgfortran5.tar.gz/sha512/6aa53edf48a17ec8515cad5c79a15ab0e40cc44c9ffb188fd57fc560dde7a99d6487ead6e4caafaa9912c6590c6a391f914016fd4342589da09d56c657ad2c07 -CompilerSupportLibraries.v0.5.0+0.armv6l-linux-gnueabihf-libgfortran3.tar.gz/md5/d3aaf50955ad671917e941e0dcf3803f -CompilerSupportLibraries.v0.5.0+0.armv6l-linux-gnueabihf-libgfortran3.tar.gz/sha512/72983b2272300c2332cfe6864b5dd5249bbbb181bd65b10bf6bfb3a37e5e582bb9c159db0b63a077066a325899a2864717f28c60c85027be3b637bb80f994e52 -CompilerSupportLibraries.v0.5.0+0.armv6l-linux-gnueabihf-libgfortran4.tar.gz/md5/e221d51df9b18b2562a0f3e8dc8012cd -CompilerSupportLibraries.v0.5.0+0.armv6l-linux-gnueabihf-libgfortran4.tar.gz/sha512/758b07b4a559dda747574649926333a70355e2d80acb2ea37bb39777c0b1cecf8f308a5f8062110c378db2230ec8baf23385ae313d1c58de8bfc651573c64c1f -CompilerSupportLibraries.v0.5.0+0.armv6l-linux-gnueabihf-libgfortran5.tar.gz/md5/96f7feef9b1dd7944130de2e9cda68b8 -CompilerSupportLibraries.v0.5.0+0.armv6l-linux-gnueabihf-libgfortran5.tar.gz/sha512/8b4aaff1388cd506bef7f3a9edd42ed8ee1db468a18d34cd5d58d7da305853dbf48d4665e99c06c6fb0115e421d19dba5c36e947cb06defe7f479a05b547f112 -CompilerSupportLibraries.v0.5.0+0.armv6l-linux-musleabihf-libgfortran3.tar.gz/md5/a1e3642a7ce2b7834aa2f1b695a9977c -CompilerSupportLibraries.v0.5.0+0.armv6l-linux-musleabihf-libgfortran3.tar.gz/sha512/9d22b1fa8fa8eaaa5316cb494eb223e0fe73660aa5ca7518180e40d296d6d07a9863938501e5d5350bf79e79d975d7d66dca12768a0a69527d2c17baf7aaf345 -CompilerSupportLibraries.v0.5.0+0.armv6l-linux-musleabihf-libgfortran4.tar.gz/md5/d897098fd98928c2d644ed5ee26c3faa -CompilerSupportLibraries.v0.5.0+0.armv6l-linux-musleabihf-libgfortran4.tar.gz/sha512/4aad051f4f1e3d744825c650363a49f39e04cbd44dad25197ddee1890339e9441aa872f893478a2d8ff556c9a70a89c2885cd779ba3efd3c0f7193c386b820b7 -CompilerSupportLibraries.v0.5.0+0.armv6l-linux-musleabihf-libgfortran5.tar.gz/md5/c36bfd4c5b90d55c55bc18feaf51b134 -CompilerSupportLibraries.v0.5.0+0.armv6l-linux-musleabihf-libgfortran5.tar.gz/sha512/ab16c638780a0118b930ac587df81fa74d2731bf1af402266106e1ecb791df353c1f368a8e7fc9147d390825ff8624e600aae45f1f6ccfc0015ce131368452d7 -CompilerSupportLibraries.v0.5.0+0.armv7l-linux-gnueabihf-libgfortran3.tar.gz/md5/feb76551e6f7407de3006a3d363cee7a -CompilerSupportLibraries.v0.5.0+0.armv7l-linux-gnueabihf-libgfortran3.tar.gz/sha512/976f8e34e72231b013ea0418feff9c3c9efa7b9c34688aca115a03f2bade8760ca9f259f8f502ef5012fbb389f4bf365fd7639b066daca16fb7ec1d32b5cd789 -CompilerSupportLibraries.v0.5.0+0.armv7l-linux-gnueabihf-libgfortran4.tar.gz/md5/560ca43fa6dbd3f2e9052401477df165 -CompilerSupportLibraries.v0.5.0+0.armv7l-linux-gnueabihf-libgfortran4.tar.gz/sha512/333c7f4fbc172e7fd3d99e2673dbed1d9c699a5bb29a20095a255fadc89ded05abda755fc167aa8a16a4e93f524390c9c817df7b67fccdca88754d0301259977 -CompilerSupportLibraries.v0.5.0+0.armv7l-linux-gnueabihf-libgfortran5.tar.gz/md5/d3ac5f871599ab225a1128c302486345 -CompilerSupportLibraries.v0.5.0+0.armv7l-linux-gnueabihf-libgfortran5.tar.gz/sha512/adb706882e923978b6e18c7134578bc86ed4e031a7a0120222018cd1b8efcf530854e426b6442dbd80b8c77c3677f1906aedb12c0ddeb33efcdd3bcd2c4a109a -CompilerSupportLibraries.v0.5.0+0.armv7l-linux-musleabihf-libgfortran3.tar.gz/md5/58774aa398a63479af3f4c69678d0191 -CompilerSupportLibraries.v0.5.0+0.armv7l-linux-musleabihf-libgfortran3.tar.gz/sha512/fe9307e6fb0b54522495fc9cc48756a60fc79af27d9e73bfb3ee49cbb366dddec1beedca03614f15761b308bc28014205f174f673fa258e76d5947446b87b039 -CompilerSupportLibraries.v0.5.0+0.armv7l-linux-musleabihf-libgfortran4.tar.gz/md5/af1a8ce693ba307e61184f4023d73d67 -CompilerSupportLibraries.v0.5.0+0.armv7l-linux-musleabihf-libgfortran4.tar.gz/sha512/2ea581bb44408fc789ac306734736f6eb6cf0a15b234f43a6f50ae8f10014b5689f5aa8356112c2b54a86b9a7734ace3479c4e4aba1e5df636dda3dcd09b7e28 -CompilerSupportLibraries.v0.5.0+0.armv7l-linux-musleabihf-libgfortran5.tar.gz/md5/20d62064f495877f12b7e87e684ad43a -CompilerSupportLibraries.v0.5.0+0.armv7l-linux-musleabihf-libgfortran5.tar.gz/sha512/31b1c7c9fe3378e8bb788c897bbac0505a5ae70f500f3b1457325dbbb149c14224a88d17fbcf453465d8a572f33157766bb0e815cce7c8a2aa8a44422d34a365 -CompilerSupportLibraries.v0.5.0+0.i686-linux-gnu-libgfortran3.tar.gz/md5/fd4035aef1c83be0b865d70aa35e770b -CompilerSupportLibraries.v0.5.0+0.i686-linux-gnu-libgfortran3.tar.gz/sha512/a72047e7071838899d75896b4dcbdc102bca884507f4758b4e0dd62f50c9ce584f2b2b86d8b67dfc4fce9864faf9723056820e464bbab1a6173be47ad941d6da -CompilerSupportLibraries.v0.5.0+0.i686-linux-gnu-libgfortran4.tar.gz/md5/89715bfa0e69528d4d294ed449ef0e09 -CompilerSupportLibraries.v0.5.0+0.i686-linux-gnu-libgfortran4.tar.gz/sha512/6eb7947c72ec32d189221de42d5a76423a1fb5745db0812d88afe7f961d8f42669c7cf487235c1dcc81fbe73106b785c906bd6741e98f60e9931f4083be0e9ce -CompilerSupportLibraries.v0.5.0+0.i686-linux-gnu-libgfortran5.tar.gz/md5/5c1c73dc72029781847f74bcb1189c4b -CompilerSupportLibraries.v0.5.0+0.i686-linux-gnu-libgfortran5.tar.gz/sha512/642d35ed41a65c7a2d7f4f127f936d3cb1665c207aa5feef25cce09cc11e733d7ec129673fea873403567c35cf16122ed1635c303ba13bb3349be44585f3ca82 -CompilerSupportLibraries.v0.5.0+0.i686-linux-musl-libgfortran3.tar.gz/md5/f91c962e7bc3ffb825c7e5fb1e099ba6 -CompilerSupportLibraries.v0.5.0+0.i686-linux-musl-libgfortran3.tar.gz/sha512/f89df221ff80bcbb1e6edc2f9cc28dc138d7d6ae99ac018a3cdc9a09ba637f1a9938b1f0876086f4f822fb911853286dd4f1776d603a403190bee052431ae572 -CompilerSupportLibraries.v0.5.0+0.i686-linux-musl-libgfortran4.tar.gz/md5/d2a81da3371a638f76087629ae0a6507 -CompilerSupportLibraries.v0.5.0+0.i686-linux-musl-libgfortran4.tar.gz/sha512/67941af15a0f032a853cdea180e4f87249bed2dfd09ade6fca9760f5a44b26fc94a0d6932803edbd27b75aa8d26e64c377af2d64ddcba3206562be1427a64c80 -CompilerSupportLibraries.v0.5.0+0.i686-linux-musl-libgfortran5.tar.gz/md5/cec9f3b9d4924a49a34c632efd167752 -CompilerSupportLibraries.v0.5.0+0.i686-linux-musl-libgfortran5.tar.gz/sha512/9320eee2b6dbadd4e0ed3f8763d58854eb179b1d1661c8f1dba75c22af2330812040507944b0ab20b7a7cb233c9953a1d3a4b27937e7b7a858aed2255ad0fbbc -CompilerSupportLibraries.v0.5.0+0.i686-w64-mingw32-libgfortran3.tar.gz/md5/c36411b24c8bec4805230bd4fe0f2391 -CompilerSupportLibraries.v0.5.0+0.i686-w64-mingw32-libgfortran3.tar.gz/sha512/839b447efa46caffa699258ec8ae5e0a55d7f98a7fc037b48e6a6c29193e3d8bf48397575cc518716f41e2e9344daa670693df605a1b9d4a23d3f454ec5ab399 -CompilerSupportLibraries.v0.5.0+0.i686-w64-mingw32-libgfortran4.tar.gz/md5/d2e392edff3525afff6734fdf47c9ab1 -CompilerSupportLibraries.v0.5.0+0.i686-w64-mingw32-libgfortran4.tar.gz/sha512/1816c7ed409acc1435c7fcfd550b7664a08b31ecf433a906d8903a60ed458dab0fa712bd0d1590a0dc8506763a617446ba402efc78a2c010562c45e8eca66a88 -CompilerSupportLibraries.v0.5.0+0.i686-w64-mingw32-libgfortran5.tar.gz/md5/2cfeb5cd0a7e2400c9be3e846a1875d2 -CompilerSupportLibraries.v0.5.0+0.i686-w64-mingw32-libgfortran5.tar.gz/sha512/ca620dd8542ffe9a177b0f95712e77e59b0fc1044e0186dd7468a86aba4d2b92931a1d6f980e75cceb26c6c5f9dab427f4ce32e0f77998b9a827b3ce9151041c -CompilerSupportLibraries.v0.5.0+0.powerpc64le-linux-gnu-libgfortran3.tar.gz/md5/8ba0e4070358839909934d8a1bc9e0bf -CompilerSupportLibraries.v0.5.0+0.powerpc64le-linux-gnu-libgfortran3.tar.gz/sha512/8750769ca321f863fbb354f6e4e76b1241f7e24e5f4ea14ea511486dc5bc4fe8274740f1500149c5ac85a8214a0193c9a09332f35eb47e6222bef9070eecc6c8 -CompilerSupportLibraries.v0.5.0+0.powerpc64le-linux-gnu-libgfortran4.tar.gz/md5/50554a092af3a4a651b53e3ce3cf8a2d -CompilerSupportLibraries.v0.5.0+0.powerpc64le-linux-gnu-libgfortran4.tar.gz/sha512/53ec765d4de3b0bae9727b3b2a27437b184f2072aecda5d0b22d648a95fbba777bb89da823bc851d7242cd3f8c212e3fdaea8e5af11db21c578c2e12db51991d -CompilerSupportLibraries.v0.5.0+0.powerpc64le-linux-gnu-libgfortran5.tar.gz/md5/b09a5913b537b26aa7f8996b1877c748 -CompilerSupportLibraries.v0.5.0+0.powerpc64le-linux-gnu-libgfortran5.tar.gz/sha512/b68020c1b1acf4a1c51822bccc1eb67574ceffae3c133e7efe22ec0cc3a674a7c056c01be02c1c681f469fe1443d76baf4b0e305bec8181e57c3ce5a446a5c22 -CompilerSupportLibraries.v0.5.0+0.x86_64-apple-darwin-libgfortran3.tar.gz/md5/1e4c5d2084f76eacb4419214668c6594 -CompilerSupportLibraries.v0.5.0+0.x86_64-apple-darwin-libgfortran3.tar.gz/sha512/696155b560bfaf592bf7024ba0e6f084382dd269cdd25416fa8840387c101132901e94709c8d0534f038666a6f6849c3d55e8bed4223b5be499e099b49610e77 -CompilerSupportLibraries.v0.5.0+0.x86_64-apple-darwin-libgfortran4.tar.gz/md5/63b386e59f3732d03459c59000fc1382 -CompilerSupportLibraries.v0.5.0+0.x86_64-apple-darwin-libgfortran4.tar.gz/sha512/f6c7e0611df7fd86cc9ca63b380e112561d10b489bc8fbfe911c441ef5e87776761d3c161ff5f6aade479f7e96456084c6939d7eff175ced4f42b3b9ee29426a -CompilerSupportLibraries.v0.5.0+0.x86_64-apple-darwin-libgfortran5.tar.gz/md5/07e22a4b58aaaf145e52b36602c5b08d -CompilerSupportLibraries.v0.5.0+0.x86_64-apple-darwin-libgfortran5.tar.gz/sha512/8a047b0098e8504e2dde0113170416686bc70f9d685fcb19bf3eb76afe30dc16a3b0d2023eb704c25025bbef87e99603dbd2a2708b1a3df908747b06cbfc92ee -CompilerSupportLibraries.v0.5.0+0.x86_64-linux-gnu-libgfortran3.tar.gz/md5/23048b3be33f184ffc9be42ca914aa3a -CompilerSupportLibraries.v0.5.0+0.x86_64-linux-gnu-libgfortran3.tar.gz/sha512/4573b21e34f4d8127a86c18f95065039da92eeb9ade4058bd8459034bb4a003ceefe29e865089126fdc36cffd95a9c12bcb72ed74bff5987a9d1f4b300ecfe45 -CompilerSupportLibraries.v0.5.0+0.x86_64-linux-gnu-libgfortran4.tar.gz/md5/3314ec0668abf069c900558de0690b65 -CompilerSupportLibraries.v0.5.0+0.x86_64-linux-gnu-libgfortran4.tar.gz/sha512/d012c4674401773000f0de831cb8b4b6c454d0ab68d51fbbe970504e76c693211086a24a7df34de2390eaeb438ab23f63c68b480a408ab2136f442aba5094bd7 -CompilerSupportLibraries.v0.5.0+0.x86_64-linux-gnu-libgfortran5.tar.gz/md5/e7768c00909613b8f29f6a5860ff4247 -CompilerSupportLibraries.v0.5.0+0.x86_64-linux-gnu-libgfortran5.tar.gz/sha512/43c29456a0fc74c4fda42d088903651c6bbac6b842f2aa600e3019b391b04158ee97f884e6962bd9e7a9cf337dbb1cdb2151d103e1dee5214ba798b167b1ed32 -CompilerSupportLibraries.v0.5.0+0.x86_64-linux-musl-libgfortran3.tar.gz/md5/b2a30e92ba8e40ef070e3ec7c16b97f0 -CompilerSupportLibraries.v0.5.0+0.x86_64-linux-musl-libgfortran3.tar.gz/sha512/64a4029dd1e84922728b2c93a455d7d6b262c979dddf59301ff96e9c28980fbd9c1db57e81afaece96ccb51b9751e5a0180b84e412427430487280c56d8da266 -CompilerSupportLibraries.v0.5.0+0.x86_64-linux-musl-libgfortran4.tar.gz/md5/b0610d32a80b3f87baebf0250b0f92d6 -CompilerSupportLibraries.v0.5.0+0.x86_64-linux-musl-libgfortran4.tar.gz/sha512/3b7098fbb82e4a7a903b82f942303b248e0e35be13a47e4839a036085c4a33925f1f78fe941b852331cc52de80f32bcdb9a64ccff0386e1070a6ca4600c08eb8 -CompilerSupportLibraries.v0.5.0+0.x86_64-linux-musl-libgfortran5.tar.gz/md5/3f905dd4e8b3cfd2cc3f8efcaa50a407 -CompilerSupportLibraries.v0.5.0+0.x86_64-linux-musl-libgfortran5.tar.gz/sha512/22af14d245e3c062131dd274afa6d9c7cde9a11ee2455e27ae2f7725a025fc2cd6cdb3a1a3c899988c6c3412a714c1f0763f4e08924726212405938c3cf66da5 -CompilerSupportLibraries.v0.5.0+0.x86_64-unknown-freebsd-libgfortran3.tar.gz/md5/2c56a22c935dda76831f36c713cca099 -CompilerSupportLibraries.v0.5.0+0.x86_64-unknown-freebsd-libgfortran3.tar.gz/sha512/6bd9bd6ec8b6b18013b3c6de344de134835c9281d39bc5e6e31928970c60b584fa625df18efbce3ea571dee53011dec73e9aae9159e812f219692fbb4dd86a2d -CompilerSupportLibraries.v0.5.0+0.x86_64-unknown-freebsd-libgfortran4.tar.gz/md5/e483c3e85b4d4b2685ee4e8f09951ac1 -CompilerSupportLibraries.v0.5.0+0.x86_64-unknown-freebsd-libgfortran4.tar.gz/sha512/47c2f305237ccd55ed2ba445cbcd599c23f9c1392388017506f9d61a4dc8fec4ba4136be81a0e82de4f161f6788c4a62acc9d71efe6cf90b766e5339950ed337 -CompilerSupportLibraries.v0.5.0+0.x86_64-unknown-freebsd-libgfortran5.tar.gz/md5/41c25d9cf7545721b8d4dd2386e95ead -CompilerSupportLibraries.v0.5.0+0.x86_64-unknown-freebsd-libgfortran5.tar.gz/sha512/173570bbf4eb60d678472058ec2c18732cd27ad2911457c83f47a1d97c1c0028d91005cf56539e51d4a04178544ac0bba47ea27e74b6b4e8d3310551ad3167fe -CompilerSupportLibraries.v0.5.0+0.x86_64-w64-mingw32-libgfortran3.tar.gz/md5/f124c93580a038ce806f479568b46597 -CompilerSupportLibraries.v0.5.0+0.x86_64-w64-mingw32-libgfortran3.tar.gz/sha512/c313390dbcffaea6cb5202645b5304134a1ce6aac5a3835696f45316c8170b237c04f13166694eee0f31903ac1e5c3cd73ad8974ba19b44289da3504d3436f8c -CompilerSupportLibraries.v0.5.0+0.x86_64-w64-mingw32-libgfortran4.tar.gz/md5/050fe7a6bdf980c198f4c201629d15e0 -CompilerSupportLibraries.v0.5.0+0.x86_64-w64-mingw32-libgfortran4.tar.gz/sha512/211e435f5e2b7209aedaf4a81b5e0d5e615b9144de248c06e43dc61b31890dbde80d718e74454b489bd1f77476d34bd01d3f9a25355bc50fca0dc07df0264cad -CompilerSupportLibraries.v0.5.0+0.x86_64-w64-mingw32-libgfortran5.tar.gz/md5/3566d0f714c1503b92160b486a4eaa4a -CompilerSupportLibraries.v0.5.0+0.x86_64-w64-mingw32-libgfortran5.tar.gz/sha512/b2f29c1c6dc35e1002021f8f15a20a72a57c346b33a6d045ff7a261e88767738a4da1dd88aa71a20514bdf6376099979c9d938173fa3ae28641c40372c94db60 +CompilerSupportLibraries.v0.5.2+0.aarch64-apple-darwin-libgfortran5.tar.gz/md5/e0651fbefd39d405ec97d7530f2887d7 +CompilerSupportLibraries.v0.5.2+0.aarch64-apple-darwin-libgfortran5.tar.gz/sha512/0a067b7e37d98a4c96dd1400b8c1a07c82cc223d11a93a0ee2455c3b55b394eee0cb251e26206495453f2cf8866822fb586ffe105f44e3380fa949adffe8b83c +CompilerSupportLibraries.v0.5.2+0.aarch64-linux-gnu-libgfortran3.tar.gz/md5/1f4a5e98cd88a08029326ca5e9d47e9c +CompilerSupportLibraries.v0.5.2+0.aarch64-linux-gnu-libgfortran3.tar.gz/sha512/696f359746de592d4e30dc9ad19d5e07ebc1e6635e1f082e249747c42338ef04ce885fee5ad5915ec39fa2866af4265bb6ef580c75874c091a15b64d02626123 +CompilerSupportLibraries.v0.5.2+0.aarch64-linux-gnu-libgfortran4.tar.gz/md5/8285fd34164fac0410fcec6bb9d8b8e4 +CompilerSupportLibraries.v0.5.2+0.aarch64-linux-gnu-libgfortran4.tar.gz/sha512/df0869d357326c803d8ff33c9734f01457d877e80c4af33745d4ca016144eb0c52fba7aad7e1098eecde3fc4cf41ed971638b4b6f901c7306a2072e8c14c3513 +CompilerSupportLibraries.v0.5.2+0.aarch64-linux-gnu-libgfortran5.tar.gz/md5/82add6093bda667442236c04d84b6934 +CompilerSupportLibraries.v0.5.2+0.aarch64-linux-gnu-libgfortran5.tar.gz/sha512/81538d75950cdf931f9aaa932d1f9cf40998bc256924c3231e984179f6a5c3eca0f7e1ba315b21f2add3bf9376e3a45ee59ccd8d9f6d765105e05da25bf65cfc +CompilerSupportLibraries.v0.5.2+0.aarch64-linux-musl-libgfortran3.tar.gz/md5/ee0d6a9f0a1372e36a02a95b6c07aefc +CompilerSupportLibraries.v0.5.2+0.aarch64-linux-musl-libgfortran3.tar.gz/sha512/f248e57249af88520f9c7ac32dba45ca03e5904606b4edb682ea514c31a9a775198d02f0892e79124326e184d7906b7a13b0e4f3e7721352b8105cdfa72f89ed +CompilerSupportLibraries.v0.5.2+0.aarch64-linux-musl-libgfortran4.tar.gz/md5/dddc8f7a9be9f07e9738e2a027fe8a0c +CompilerSupportLibraries.v0.5.2+0.aarch64-linux-musl-libgfortran4.tar.gz/sha512/36f9b94f470d451b9c3c2429026292463434427625563240467f50374624a69fbca7ddcb0678937a58d22d32a8157571d3e201c47cc9a2484d1d75d4c0f77ebc +CompilerSupportLibraries.v0.5.2+0.aarch64-linux-musl-libgfortran5.tar.gz/md5/12b7eb088023eaf9583ffa6f9f0e18ac +CompilerSupportLibraries.v0.5.2+0.aarch64-linux-musl-libgfortran5.tar.gz/sha512/a5f5a6053e63ea1fb0185a0c3a7752a938373da847dffb872c1227ed3a0a80f2de1e4394baaaeeb8e0d8f2a4da123433896742cfdca6f94343bd4d0ab3578c65 +CompilerSupportLibraries.v0.5.2+0.armv6l-linux-gnueabihf-libgfortran3.tar.gz/md5/e5e6918571981e4cfa5a2951e59f2df7 +CompilerSupportLibraries.v0.5.2+0.armv6l-linux-gnueabihf-libgfortran3.tar.gz/sha512/5d7b0f4f55b6726ae7317edb170cafb6a2c4563b0f4a90c619da95c120edd8fdce118bbd1e7168110f75cc899b857472fd524a396deb6d9f2552f53c861faeb7 +CompilerSupportLibraries.v0.5.2+0.armv6l-linux-gnueabihf-libgfortran4.tar.gz/md5/7ae11706e9c6c043ad771f2700d06591 +CompilerSupportLibraries.v0.5.2+0.armv6l-linux-gnueabihf-libgfortran4.tar.gz/sha512/4f2f01aed00a58f4393cfd4608df1a6df6c9bff6e352a02a2b9af13f14a4436611769d64d082d3b151ba23d3d905ae2700bf469b9858249757ad7b5aae716d6a +CompilerSupportLibraries.v0.5.2+0.armv6l-linux-gnueabihf-libgfortran5.tar.gz/md5/e922dad7dad1d5f80cc154a6ddb6de35 +CompilerSupportLibraries.v0.5.2+0.armv6l-linux-gnueabihf-libgfortran5.tar.gz/sha512/3fabbcedbbc4abfe1e0c01c387bbe2537105937674877122b5b66d6015944a58f547106da1e185c1434de0c1883d356f8dc52968f075a00c6a8a52edaaf88957 +CompilerSupportLibraries.v0.5.2+0.armv6l-linux-musleabihf-libgfortran3.tar.gz/md5/53741f61d806efe045a5abe0e748aa36 +CompilerSupportLibraries.v0.5.2+0.armv6l-linux-musleabihf-libgfortran3.tar.gz/sha512/b975a8fdfb736ef2b1aede2c89e390df261bfe8aaf8ffdb37887add09263d95f46642c3898ac19ec6098cdfdfc7f0726436dc273e9f70f10fe1abf4ea945277a +CompilerSupportLibraries.v0.5.2+0.armv6l-linux-musleabihf-libgfortran4.tar.gz/md5/9687cf768c6c2879261e385c44ba490c +CompilerSupportLibraries.v0.5.2+0.armv6l-linux-musleabihf-libgfortran4.tar.gz/sha512/02f9accf8273597f6889677de64255e4e399d67377b5363ed31dea7e2118cc24d3b7fad7c0632aea79dee44250b1ff74bf2fa22e4f3e7755de65871854112c14 +CompilerSupportLibraries.v0.5.2+0.armv6l-linux-musleabihf-libgfortran5.tar.gz/md5/b62a81b9f43903b3de6fa1c78c03b89f +CompilerSupportLibraries.v0.5.2+0.armv6l-linux-musleabihf-libgfortran5.tar.gz/sha512/d44eecb30ccf19bc8dca41c738dbedd2bd2cb6e379a3ab181c955cb9cdf9bae8efeaf7a90c85dc7434520ead7e910d38e92b448cff7aecaef0902684e9b06c9f +CompilerSupportLibraries.v0.5.2+0.armv7l-linux-gnueabihf-libgfortran3.tar.gz/md5/e31780333339ac64f54ad434578d6294 +CompilerSupportLibraries.v0.5.2+0.armv7l-linux-gnueabihf-libgfortran3.tar.gz/sha512/9c3b91ed90f3393dfc72e7e2feefa60afe6ad457971950b163ffbecafa41cea43a15cdfadd8f402fd8fb61652c224f5b1a04c432fb0f43593749f51ed1340116 +CompilerSupportLibraries.v0.5.2+0.armv7l-linux-gnueabihf-libgfortran4.tar.gz/md5/0f7bdfb908aa3d721428a1ee8412b594 +CompilerSupportLibraries.v0.5.2+0.armv7l-linux-gnueabihf-libgfortran4.tar.gz/sha512/3199da41c3df3d702a557c8b5e9fdde3a47c12d4c45fb9094fd194cbbe667663334b6cc0a5169fcc755790c4b5fada71c5094dc8d9a7f8b6c836d3f4c4c6e509 +CompilerSupportLibraries.v0.5.2+0.armv7l-linux-gnueabihf-libgfortran5.tar.gz/md5/f455758e436750092ba2df65adcfd380 +CompilerSupportLibraries.v0.5.2+0.armv7l-linux-gnueabihf-libgfortran5.tar.gz/sha512/b5d0dbdff19b5ce076b8ae7b907da25fdbe05eabd47e46987f9987690a3a670d14bd3d2c2343d366ca1ee861b85fcbaccc1460ba3a73571686ef9e4330427b65 +CompilerSupportLibraries.v0.5.2+0.armv7l-linux-musleabihf-libgfortran3.tar.gz/md5/4cf3790d881b829b4b8da882987d5a40 +CompilerSupportLibraries.v0.5.2+0.armv7l-linux-musleabihf-libgfortran3.tar.gz/sha512/ef5810243af32135da0cb7d08ae35ff8a2cce50c05200450154aa860c181719844466b787faae551aa71bd94e721f2d7d17ab14a049d0558666037862aff2f6a +CompilerSupportLibraries.v0.5.2+0.armv7l-linux-musleabihf-libgfortran4.tar.gz/md5/a49e1fa6e040ac86ddd85a3188f83a76 +CompilerSupportLibraries.v0.5.2+0.armv7l-linux-musleabihf-libgfortran4.tar.gz/sha512/cb0292651392a14f952181eb7a4a0ea6359632e96b017169cf4f1792f44f2846b5d6b2b5d334dee490262dd1c2d421de49d1f4a919402392f77fdaf60c1d19a3 +CompilerSupportLibraries.v0.5.2+0.armv7l-linux-musleabihf-libgfortran5.tar.gz/md5/3f64969e0e70dc8644fe09637dd1cbe7 +CompilerSupportLibraries.v0.5.2+0.armv7l-linux-musleabihf-libgfortran5.tar.gz/sha512/0a71f8b731911019666bdc82f42e306ff1801321362ce6fe58988c9a1b110cd032a01c11fd0f9a6a3fbf6c6545f3287e363f5b3c40ef2eab0659638c38687196 +CompilerSupportLibraries.v0.5.2+0.i686-linux-gnu-libgfortran3.tar.gz/md5/28f58931f66a3405fc4c99ce40724ece +CompilerSupportLibraries.v0.5.2+0.i686-linux-gnu-libgfortran3.tar.gz/sha512/d5290079264cfc6f716dcc9171f8412369e685c7ba0b9e82ae3d764de41671fbb4a24fdf7ebae9a9b913393837c2e41951326dbf3e870340fba7121709ebba8b +CompilerSupportLibraries.v0.5.2+0.i686-linux-gnu-libgfortran4.tar.gz/md5/f98763aae801cc7d88124bea422f13ca +CompilerSupportLibraries.v0.5.2+0.i686-linux-gnu-libgfortran4.tar.gz/sha512/da2095a462637ffcd0825949f4bcc86be9484c9e009648dc3c2e22e2fa19c65124e5e45f2694e85616df49b1181e2f4d2b886d3b83401c09ca58207db461ea23 +CompilerSupportLibraries.v0.5.2+0.i686-linux-gnu-libgfortran5.tar.gz/md5/1bfee57db4f2bdd788e59e34d0bb4506 +CompilerSupportLibraries.v0.5.2+0.i686-linux-gnu-libgfortran5.tar.gz/sha512/8f4814d97d6cd6c1f0c1d23fce875c40b6df7de7a8dc66e66681ba3c533120cb14d9d018808ff4e33dec53bb8958fbcedc9be6ac70817839ff89a0db5c0d18a8 +CompilerSupportLibraries.v0.5.2+0.i686-linux-musl-libgfortran3.tar.gz/md5/5da7af0483ffde929c58f3ae411f6489 +CompilerSupportLibraries.v0.5.2+0.i686-linux-musl-libgfortran3.tar.gz/sha512/97e56fe4fe0e10fa0d57ec10882a62d290829940049ffce7a8d81a843b91c7844e53d737bcdbc7a5e8206ca9820a7066fcdd7d0eed1e831d7af96222ccca1224 +CompilerSupportLibraries.v0.5.2+0.i686-linux-musl-libgfortran4.tar.gz/md5/a0b5cf513f2f02107c8887ea5e30cdda +CompilerSupportLibraries.v0.5.2+0.i686-linux-musl-libgfortran4.tar.gz/sha512/aeeacfb58094751fe5cec87825ebb02a22c58d3e7300b6ca6066eb717e28ebecff230838c32935ac11376a6efdd5a0c44fe0c8e7d5b9a1f0165171c2b67a2d8b +CompilerSupportLibraries.v0.5.2+0.i686-linux-musl-libgfortran5.tar.gz/md5/569ef42292d8cfd157026b434e93fe4d +CompilerSupportLibraries.v0.5.2+0.i686-linux-musl-libgfortran5.tar.gz/sha512/daf543fbe7e80fd63220f7c08e0d6b51d45ce9e0af592a591eecadcaac9b859ce596df2bf8fcb3fb72fb799f869d0caac28acb5d26b3c3aed6dc80245b90dcce +CompilerSupportLibraries.v0.5.2+0.i686-w64-mingw32-libgfortran3.tar.gz/md5/f4e0f3d40f7f77d32f26424dedff850f +CompilerSupportLibraries.v0.5.2+0.i686-w64-mingw32-libgfortran3.tar.gz/sha512/57e35c39c4c93919cdbbe33891b5938918d33840ad33ed51a010f9deab791d60fa2d030d3e14df6e445e0607dc9280b07ca287a3273630bf7e245d6ab8069cbd +CompilerSupportLibraries.v0.5.2+0.i686-w64-mingw32-libgfortran4.tar.gz/md5/d366731c11314cb908fca2032e7fefca +CompilerSupportLibraries.v0.5.2+0.i686-w64-mingw32-libgfortran4.tar.gz/sha512/a7e087e718f9d8cb4957b8bf3a4554faae97510b25d88a3e9ae4241cb69efa5b520bd9424a0072e7d712c9435e6900690c56004a716a716838367e91fe20e11d +CompilerSupportLibraries.v0.5.2+0.i686-w64-mingw32-libgfortran5.tar.gz/md5/eff855bb45f038c9d74c67ae2eed5641 +CompilerSupportLibraries.v0.5.2+0.i686-w64-mingw32-libgfortran5.tar.gz/sha512/e674d60247086bb8029270406d246a4857e668442a77299a431ec837446387bd1ed2de5e0f9f6985cc6e5d15b6692f40b18e0016e7c9d4e95a3770dffc19b44d +CompilerSupportLibraries.v0.5.2+0.powerpc64le-linux-gnu-libgfortran3.tar.gz/md5/0bfe78d226b3d89a83b54c6ff39239e1 +CompilerSupportLibraries.v0.5.2+0.powerpc64le-linux-gnu-libgfortran3.tar.gz/sha512/fed14514c9603a1e4772d2fd5f4a48da751c10e34b6fba5e0c35ff40b8ed165af6daebc051fa86751bdffb8f820ac779215dc3b38c4ff5c1624214b61d7ad1b0 +CompilerSupportLibraries.v0.5.2+0.powerpc64le-linux-gnu-libgfortran4.tar.gz/md5/d5219b60117555a3ccd41ab406d485f4 +CompilerSupportLibraries.v0.5.2+0.powerpc64le-linux-gnu-libgfortran4.tar.gz/sha512/9268d7c2c6ef649dc753757f9afc7ac1382e521d02c58a91eead9873f2a80f215f3b67f9a33abad53c8bca18c19ae3e63804e01e3109c939d33555c7ec8c5b1a +CompilerSupportLibraries.v0.5.2+0.powerpc64le-linux-gnu-libgfortran5.tar.gz/md5/1f620c9a049e00b8b11c3970a23f2761 +CompilerSupportLibraries.v0.5.2+0.powerpc64le-linux-gnu-libgfortran5.tar.gz/sha512/6ac900dfac9268334c9b54badbfbec323151353e8d87d3199f875a505febf863766ded0c52bce2939e5975fa6e35a28cc16c88e7c1cce37d65725fe275813606 +CompilerSupportLibraries.v0.5.2+0.x86_64-apple-darwin-libgfortran3.tar.gz/md5/c21c35b00ed7ad0171d63006f1a4170d +CompilerSupportLibraries.v0.5.2+0.x86_64-apple-darwin-libgfortran3.tar.gz/sha512/f993a616a75b1f5ee140ed47b6e4aa981cffbbffd795fc0cf9df9397a6366a4507a158530e961c398bab656e7d51a27be026088678e0c19485ef0bad136bb69a +CompilerSupportLibraries.v0.5.2+0.x86_64-apple-darwin-libgfortran4.tar.gz/md5/f0cd5c8631256f3b903e95ad3623d702 +CompilerSupportLibraries.v0.5.2+0.x86_64-apple-darwin-libgfortran4.tar.gz/sha512/81de3f699169254fa83a3ab8b6063ddfd300065edf90f15239b0a304f3feea9534acba7d982058a7712ce94dcdb1ae036502f276813a96f8254e323787556d63 +CompilerSupportLibraries.v0.5.2+0.x86_64-apple-darwin-libgfortran5.tar.gz/md5/6030c114c1250e99958a0727da9d6daf +CompilerSupportLibraries.v0.5.2+0.x86_64-apple-darwin-libgfortran5.tar.gz/sha512/1d4be1c0718aeab056368653b7f34bd5ac3c85edb9fbdc2752b8c4877fcf5d080774506519cf285954485d806bccc18323f6c45f069db8bd314d064a2cc1ed66 +CompilerSupportLibraries.v0.5.2+0.x86_64-linux-gnu-libgfortran3.tar.gz/md5/b45ac0c04357de9d013df598dd13f3bf +CompilerSupportLibraries.v0.5.2+0.x86_64-linux-gnu-libgfortran3.tar.gz/sha512/42174d05c7165f87693efa09facc9405c9d6eab490c4b5fc74ba02e1e2e871799a24dcb7496e0693f30f9c3fd7e81020b77a3dd946832288769063f6d2a31aba +CompilerSupportLibraries.v0.5.2+0.x86_64-linux-gnu-libgfortran4.tar.gz/md5/761998b08e4b460cec95468adb850c31 +CompilerSupportLibraries.v0.5.2+0.x86_64-linux-gnu-libgfortran4.tar.gz/sha512/32853dcb3202e735325e1e0e3d88e2e446d7c88d45bc462d4e91f7d57dfd78b0f3381302e72163fafdb1c2cef53d4822e1c52289081e06b7b74d67e2ed0d34c2 +CompilerSupportLibraries.v0.5.2+0.x86_64-linux-gnu-libgfortran5.tar.gz/md5/dfd50d071702f903213ea0c6a42ad81b +CompilerSupportLibraries.v0.5.2+0.x86_64-linux-gnu-libgfortran5.tar.gz/sha512/3d6ecca7689bcb1925801d26a328790228c564bb731f6fa25d88763eeb22cccc4409dd6376c7b574ec242fbf85e41fd82d038a2650f8d33bb850b9a9a9f9a722 +CompilerSupportLibraries.v0.5.2+0.x86_64-linux-musl-libgfortran3.tar.gz/md5/0b374bc55dd0d5f4cf34a12d4901c022 +CompilerSupportLibraries.v0.5.2+0.x86_64-linux-musl-libgfortran3.tar.gz/sha512/10db23cc1d1367f40fed6c6cfc232fdc49f55e666d3623faa1af40dd781ea7a5d37b6b5a39524f0fc57d6d49947f429389bbf7075f10163090d7ea48903e688a +CompilerSupportLibraries.v0.5.2+0.x86_64-linux-musl-libgfortran4.tar.gz/md5/1e28cdc7937a500b081a1f4d340190f2 +CompilerSupportLibraries.v0.5.2+0.x86_64-linux-musl-libgfortran4.tar.gz/sha512/0b635b8f594739453033fd1dc5496976a8fff314dd078e2d8248d3c2136abaaa610ebc45252a81d16db9d91a0ec20a552f1bcb65ed3b50a627e40168e7f100e0 +CompilerSupportLibraries.v0.5.2+0.x86_64-linux-musl-libgfortran5.tar.gz/md5/f6fcf32044f69d8305a718eeb7651614 +CompilerSupportLibraries.v0.5.2+0.x86_64-linux-musl-libgfortran5.tar.gz/sha512/5940a145a3203d5a4a9b7cd9aab45b8bcff08a43a69a8fea67a9e18535625c8ecc051ba344421253b2f96eaa1a007d42555897a8f8aa0e8bd5dbf1ddbd38f197 +CompilerSupportLibraries.v0.5.2+0.x86_64-unknown-freebsd-libgfortran3.tar.gz/md5/eb46728ef7d3ce955d5a497a556138c2 +CompilerSupportLibraries.v0.5.2+0.x86_64-unknown-freebsd-libgfortran3.tar.gz/sha512/922d3a85059e7cedc6e0e52687cd6f22cb708677a65fcab86f7571737d8f17455f15b3f1af7442ee5fd04a437f226d4eee374d0f353a10f8f7a87160d7a2351d +CompilerSupportLibraries.v0.5.2+0.x86_64-unknown-freebsd-libgfortran4.tar.gz/md5/fc1f4fc44c08f0c3040b976558a35e3e +CompilerSupportLibraries.v0.5.2+0.x86_64-unknown-freebsd-libgfortran4.tar.gz/sha512/5406251fe1d1d1901ac4e6af3b8e9394fcaee2fa6a4f3d2817161a1626bc6b45d7b184f9bdd3d2e6571640f40b4e06c61f321358ad8fe484871ab9b878801a95 +CompilerSupportLibraries.v0.5.2+0.x86_64-unknown-freebsd-libgfortran5.tar.gz/md5/e1b52fdb233c9667610867e278e7719a +CompilerSupportLibraries.v0.5.2+0.x86_64-unknown-freebsd-libgfortran5.tar.gz/sha512/efadc4efc419808cb289c8c8f52664a72f2646bad2e8e02533456cf9afd613d4cbacd121da786316206df8f65b5264498f25adb04f7673121b2a58a20c4a75b9 +CompilerSupportLibraries.v0.5.2+0.x86_64-w64-mingw32-libgfortran3.tar.gz/md5/a449351de41a3140534d278aacedc54e +CompilerSupportLibraries.v0.5.2+0.x86_64-w64-mingw32-libgfortran3.tar.gz/sha512/db5bfbd161eba076598465cfee277418c6e9f4f0f7c4672a437c68ceff374f600917fdcaaa9dfdb945103d2b5c9786663e8e9403f6fdc796cda7c529dadf28ba +CompilerSupportLibraries.v0.5.2+0.x86_64-w64-mingw32-libgfortran4.tar.gz/md5/facd6a008270b85d08ca835556921127 +CompilerSupportLibraries.v0.5.2+0.x86_64-w64-mingw32-libgfortran4.tar.gz/sha512/236438e05eb3f50063aea90522e61f10a03c474f3c26117c071bf94d4ca24fae56e09a565cbf00dc5d1eabefec804fa5503ecbcc324b5da00a65b5471fccfadf +CompilerSupportLibraries.v0.5.2+0.x86_64-w64-mingw32-libgfortran5.tar.gz/md5/cd294be65ddd327d6c0feeca8b13f922 +CompilerSupportLibraries.v0.5.2+0.x86_64-w64-mingw32-libgfortran5.tar.gz/sha512/73dc99009d25fa0ebafa77d7c5747d21a6e0778a6266a2408df885d9553e4b8029c104e1fe174526d9261252bb564128ae7cf9058268475d168c79d19ee4f0c0 diff --git a/stdlib/CompilerSupportLibraries_jll/Project.toml b/stdlib/CompilerSupportLibraries_jll/Project.toml index b76517c828d0e..b3aa6c653ea1e 100644 --- a/stdlib/CompilerSupportLibraries_jll/Project.toml +++ b/stdlib/CompilerSupportLibraries_jll/Project.toml @@ -4,7 +4,7 @@ uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" # NOTE: When updating this, also make sure to update the value # `CSL_NEXT_GLIBCXX_VERSION` in `deps/csl.mk`, to properly disable # automatic usage of BB-built CSLs on extremely up-to-date systems! -version = "0.5.0+0" +version = "0.5.2+0" [deps] Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" diff --git a/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl b/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl index af8a679d87e10..1b2c0cd41cbe2 100644 --- a/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl +++ b/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl @@ -33,7 +33,7 @@ if Sys.iswindows() const libgomp = "libgomp-1.dll" elseif Sys.isapple() if arch(HostPlatform()) == "aarch64" - const libgcc_s = "@rpath/libgcc_s.2.dylib" + const libgcc_s = "@rpath/libgcc_s.1.1.dylib" else const libgcc_s = "@rpath/libgcc_s.1.dylib" end From 9569b6d84cc37be12044e705ea9e353aa63b950b Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Tue, 15 Mar 2022 17:53:37 -0700 Subject: [PATCH 28/40] [LibGit2] Teach tests to be resilient to `init.defaultBranch` (#44629) If a user runs the tests with a `~/.gitconfig` that provides an `init.defaultBranch` that is not `master`, our tests fail. Let's adjust to the user's configuration as appropriate. We'll also rename this to `default_branch` to signify that it may not be called `master` anymore. (cherry picked from commit ac1d69302ce8e682bef3108296f5a6c182b62e5f) --- stdlib/LibGit2/test/libgit2.jl | 38 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/stdlib/LibGit2/test/libgit2.jl b/stdlib/LibGit2/test/libgit2.jl index 892fb8bb6f3fe..11343bcedcd89 100644 --- a/stdlib/LibGit2/test/libgit2.jl +++ b/stdlib/LibGit2/test/libgit2.jl @@ -634,7 +634,7 @@ mktempdir() do dir commit_oid1 = LibGit2.GitHash() commit_oid2 = LibGit2.GitHash() commit_oid3 = LibGit2.GitHash() - master_branch = "master" + default_branch = LibGit2.getconfig("init.defaultBranch", "master") test_branch = "test_branch" test_branch2 = "test_branch_two" tag1 = "tag1" @@ -958,19 +958,19 @@ mktempdir() do dir # various branch properties @test LibGit2.isbranch(brref) @test !LibGit2.isremote(brref) - @test LibGit2.name(brref) == "refs/heads/master" - @test LibGit2.shortname(brref) == master_branch + @test LibGit2.name(brref) == "refs/heads/$(default_branch)" + @test LibGit2.shortname(brref) == default_branch @test LibGit2.ishead(brref) @test LibGit2.upstream(brref) === nothing # showing the GitReference to this branch show_strs = split(sprint(show, brref), "\n") @test show_strs[1] == "GitReference:" - @test show_strs[2] == "Branch with name refs/heads/master" + @test show_strs[2] == "Branch with name refs/heads/$(default_branch)" @test show_strs[3] == "Branch is HEAD." @test repo.ptr == LibGit2.repository(brref).ptr - @test brnch == master_branch - @test LibGit2.headname(repo) == master_branch + @test brnch == default_branch + @test LibGit2.headname(repo) == default_branch # create a branch *without* setting its tip as HEAD LibGit2.branch!(repo, test_branch, string(commit_oid1), set_head=false) @@ -991,7 +991,7 @@ mktempdir() do dir end end branches = map(b->LibGit2.shortname(b[1]), LibGit2.GitBranchIter(repo)) - @test master_branch in branches + @test default_branch in branches @test test_branch in branches end end @@ -1050,7 +1050,7 @@ mktempdir() do dir @test tag2 in tags refs = LibGit2.ref_list(repo) - @test refs == ["refs/heads/master", "refs/heads/test_branch", "refs/tags/tag1", "refs/tags/tag2"] + @test refs == ["refs/heads/$(default_branch)", "refs/heads/test_branch", "refs/tags/tag1", "refs/tags/tag2"] # test deleting a tag LibGit2.tag_delete(repo, tag1) tags = LibGit2.tag_list(repo) @@ -1334,7 +1334,7 @@ mktempdir() do dir add_and_commit_file(repo, "file1", "111\n") # switch back, add a commit, try to merge # from branch/merge_a - LibGit2.branch!(repo, "master") + LibGit2.branch!(repo, default_branch) # test for showing a Reference to a non-HEAD branch brref = LibGit2.GitReference(repo, "refs/heads/branch/merge_a") @@ -1347,7 +1347,7 @@ mktempdir() do dir add_and_commit_file(repo, "file2", "222\n") upst_ann = LibGit2.GitAnnotated(repo, "branch/merge_a") - head_ann = LibGit2.GitAnnotated(repo, "master") + head_ann = LibGit2.GitAnnotated(repo, default_branch) # (fail to) merge them because we can't fastforward @test_logs (:warn,"Cannot perform fast-forward merge") !LibGit2.merge!(repo, [upst_ann], true) @@ -1360,7 +1360,7 @@ mktempdir() do dir mv(joinpath(LibGit2.path(repo),"file1"),joinpath(LibGit2.path(repo),"mvfile1")) LibGit2.add!(repo, "mvfile1") LibGit2.commit(repo, "move file1") - LibGit2.branch!(repo, "master") + LibGit2.branch!(repo, default_branch) upst_ann = LibGit2.GitAnnotated(repo, "branch/merge_b") rename_flag = Cint(0) rename_flag = LibGit2.toggle(rename_flag, Cint(0)) # turns on the find renames opt @@ -1438,14 +1438,14 @@ mktempdir() do dir # the rebase should fail. @test_throws LibGit2.GitError LibGit2.rebase!(repo) # Try rebasing on master instead - newhead = LibGit2.rebase!(repo, master_branch) + newhead = LibGit2.rebase!(repo, default_branch) @test newhead == head_oid # Switch to the master branch - LibGit2.branch!(repo, master_branch) + LibGit2.branch!(repo, default_branch) fetch_heads = LibGit2.fetchheads(repo) - @test fetch_heads[1].name == "refs/heads/master" + @test fetch_heads[1].name == "refs/heads/$(default_branch)" @test fetch_heads[1].ismerge == true # we just merged master @test fetch_heads[2].name == "refs/heads/test_branch" @test fetch_heads[2].ismerge == false @@ -1485,7 +1485,7 @@ mktempdir() do dir # all tag in place branches = map(b->LibGit2.shortname(b[1]), LibGit2.GitBranchIter(repo)) - @test master_branch in branches + @test default_branch in branches @test test_branch in branches # issue #16337 @@ -1683,7 +1683,7 @@ mktempdir() do dir # add yet another file add_and_commit_file(repo, "file4", "444\n") # rebase with onto - newhead = LibGit2.rebase!(repo, "branch/a", "master") + newhead = LibGit2.rebase!(repo, "branch/a", default_branch) newerhead = LibGit2.head_oid(repo) @test newerhead == newhead @@ -1693,7 +1693,7 @@ mktempdir() do dir pre_abort_head = add_and_commit_file(repo, "file6", "666\n") # Rebase type head_ann = LibGit2.GitAnnotated(repo, "branch/a") - upst_ann = LibGit2.GitAnnotated(repo, "master") + upst_ann = LibGit2.GitAnnotated(repo, default_branch) rb = LibGit2.GitRebase(repo, head_ann, upst_ann) @test_throws BoundsError rb[3] @test_throws BoundsError rb[0] @@ -1718,7 +1718,7 @@ mktempdir() do dir a_head = LibGit2.head_oid(repo) add_and_commit_file(repo, "merge_file1", "111\n") - LibGit2.branch!(repo, "master") + LibGit2.branch!(repo, default_branch) a_head_ann = LibGit2.GitAnnotated(repo, "branch/merge_a") # merge returns true if successful @test_logs (:info,"Review and commit merged changes") LibGit2.merge!(repo, [a_head_ann]) @@ -1751,7 +1751,7 @@ mktempdir() do dir close(repo_file) # and checkout HEAD once more LibGit2.checkout_head(repo, options=LibGit2.CheckoutOptions(checkout_strategy=LibGit2.Consts.CHECKOUT_FORCE)) - @test LibGit2.headname(repo) == master_branch + @test LibGit2.headname(repo) == default_branch @test !LibGit2.isdirty(repo) end end From 3517a04811ae845d5987770677072a3252180dd8 Mon Sep 17 00:00:00 2001 From: Denis Barucic Date: Mon, 21 Mar 2022 13:06:29 +0100 Subject: [PATCH 29/40] MPFR: Fix `round(Integer, big(Inf))` (#44676) It also fixes `round(Integer, big(NaN))`. Solves #44662 (cherry picked from commit ecf3558c94898ddd4272b319d3405cf7256c6db7) --- base/mpfr.jl | 9 ++++++++- test/mpfr.jl | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/base/mpfr.jl b/base/mpfr.jl index 01f3d08c44a26..9714bfd582132 100644 --- a/base/mpfr.jl +++ b/base/mpfr.jl @@ -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) = diff --git a/test/mpfr.jl b/test/mpfr.jl index 0b6ff30e372dc..03f970e34f975 100644 --- a/test/mpfr.jl +++ b/test/mpfr.jl @@ -652,6 +652,10 @@ end @test typeof(round(Int64, x)) == Int64 && round(Int64, x) == 42 @test typeof(round(Int, x)) == Int && round(Int, x) == 42 @test typeof(round(UInt, x)) == UInt && round(UInt, x) == 0x2a + + # Issue #44662 + @test_throws InexactError round(Integer, big(Inf)) + @test_throws InexactError round(Integer, big(NaN)) end @testset "string representation" begin str = "1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012" From 26443fe9c3421b6d73108f6f15ffa28cff23b5e1 Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Mon, 28 Mar 2022 15:35:10 -0400 Subject: [PATCH 30/40] errors: fix handling of `.op` in lowering (#44770) Discovered while running the syntax tests with lines 25-28 of `jlfrontend.scm` commented out. Turned out we didn't handle `.op` correctly in neither `check-dotop` nor in `deparse`. This meant we just got `error: malformed expression` instead of an actually useful error message. (cherry picked from commit 9112135140efe9ebd39727054e904bd881d46289) --- src/ast.scm | 18 ++++++++++-------- test/syntax.jl | 7 ++++++- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/ast.scm b/src/ast.scm index bc8d847279fc9..1bd1bfa82803e 100644 --- a/src/ast.scm +++ b/src/ast.scm @@ -79,13 +79,15 @@ ((char? e) (string "'" e "'")) ((atom? e) (string e)) ((eq? (car e) '|.|) - (string (deparse (cadr e)) '|.| - (cond ((and (pair? (caddr e)) (memq (caaddr e) '(quote inert))) - (deparse-colon-dot (cadr (caddr e)))) - ((and (pair? (caddr e)) (eq? (caaddr e) 'copyast)) - (deparse-colon-dot (cadr (cadr (caddr e))))) - (else - (string #\( (deparse (caddr e)) #\)))))) + (if (length= e 2) + (string "(." (deparse (cadr e)) ")") + (string (deparse (cadr e)) '|.| + (cond ((and (pair? (caddr e)) (memq (caaddr e) '(quote inert))) + (deparse-colon-dot (cadr (caddr e)))) + ((and (pair? (caddr e)) (eq? (caaddr e) 'copyast)) + (deparse-colon-dot (cadr (cadr (caddr e))))) + (else + (string #\( (deparse (caddr e)) #\))))))) ((memq (car e) '(... |'|)) (string (deparse (cadr e)) (car e))) ((or (syntactic-op? (car e)) (eq? (car e) '|<:|) (eq? (car e) '|>:|) (eq? (car e) '-->)) @@ -438,7 +440,7 @@ (if (dotop-named? e) (error (string "invalid function name \"" (deparse e) "\"")) (if (pair? e) - (if (eq? (car e) '|.|) + (if (and (eq? (car e) '|.|) (length= e 3)) (check-dotop (caddr e)) (if (quoted? e) (check-dotop (cadr e)))))) diff --git a/test/syntax.jl b/test/syntax.jl index 28dac53036a98..0141b1b1068c2 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -1888,7 +1888,12 @@ f31404(a, b; kws...) = (a, b, values(kws)) # issue #28992 macro id28992(x) x end @test @id28992(1 .+ 2) == 3 -@test Meta.isexpr(Meta.lower(@__MODULE__, :(@id28992((.+)(a,b) = 0))), :error) +@test Meta.@lower(.+(a,b) = 0) == Expr(:error, "invalid function name \".+\"") +@test Meta.@lower((.+)(a,b) = 0) == Expr(:error, "invalid function name \"(.+)\"") +let m = @__MODULE__ + @test Meta.lower(m, :($m.@id28992(.+(a,b) = 0))) == Expr(:error, "invalid function name \"$(nameof(m)).:.+\"") + @test Meta.lower(m, :($m.@id28992((.+)(a,b) = 0))) == Expr(:error, "invalid function name \"(.$(nameof(m)).+)\"") +end @test @id28992([1] .< [2] .< [3]) == [true] @test @id28992(2 ^ -2) == 0.25 @test @id28992(2 .^ -2) == 0.25 From 0972a3837f2b5a5f71be79a07387451648df62d9 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 7 Apr 2022 13:48:04 -0400 Subject: [PATCH 31/40] fix missing field type initialization vars (#44797) We were accidentally passing the start of the list instead of the end of the list, resulting in some values passing through uninitialized. Fix #42297 regression (cherry picked from commit 5f2abf6cfaa49220f08900d6a7a4422b94e32187) --- src/jltypes.c | 4 ++-- test/core.jl | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/jltypes.c b/src/jltypes.c index ba5aa57a166bf..8b28e085d7871 100644 --- a/src/jltypes.c +++ b/src/jltypes.c @@ -1912,7 +1912,7 @@ void jl_reinstantiate_inner_types(jl_datatype_t *t) // can throw! for (i = 0; i < n; i++) env[i].val = jl_svecref(ndt->parameters, i); - ndt->super = (jl_datatype_t*)inst_type_w_((jl_value_t*)t->super, env, &top, 1); + ndt->super = (jl_datatype_t*)inst_type_w_((jl_value_t*)t->super, &env[n - 1], &top, 1); jl_gc_wb(ndt, ndt->super); } @@ -1922,7 +1922,7 @@ void jl_reinstantiate_inner_types(jl_datatype_t *t) // can throw! for (i = 0; i < n; i++) env[i].val = jl_svecref(ndt->parameters, i); assert(ndt->types == NULL); - ndt->types = inst_ftypes(t->types, env, &top); + ndt->types = inst_ftypes(t->types, &env[n - 1], &top); jl_gc_wb(ndt, ndt->types); if (ndt->isconcretetype) { // cacheable jl_compute_field_offsets(ndt); diff --git a/test/core.jl b/test/core.jl index e44b3c3be38cb..2c9a86e777315 100644 --- a/test/core.jl +++ b/test/core.jl @@ -239,6 +239,15 @@ end #struct S22624{A,B,C} <: Ref{S22624{Int64,A}}; end @test_broken @isdefined S22624 +# issue #42297 +mutable struct Node42297{T, V} + value::V + next::Union{Node42297{T, T}, Node42297{T, Val{T}}, Nothing} + Node42297{T}(value) where {T} = new{T, typeof(value)}(value, nothing) +end +@test fieldtype(Node42297{Int,Val{Int}}, 1) === Val{Int} +@test fieldtype(Node42297{Int,Int}, 1) === Int + # issue #3890 mutable struct A3890{T1} x::Matrix{Complex{T1}} From 8e2b69d11a2abfc9e9882fc51cd573b4025d9cf7 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 14 Apr 2022 04:19:56 -0400 Subject: [PATCH 32/40] [REPL] Fix a REPL test failure by removing an erroneous space in test (#44972) * [REPL] remove erroneous space in test Introduced by https://github.com/JuliaLang/julia/pull/33805 (74f2de13727373b44da76a65ceb5297889d3e482). * Revert "Temporarily move the `REPL` test suite to node 1, to buy us time until we fix the underlying bugs (#44961)" This reverts commit 322fd706a1739daf4776fd050df756e6670ba958. (cherry picked from commit fbec395fd049948618442569aa3a7708ceed2013) --- stdlib/REPL/test/repl.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/REPL/test/repl.jl b/stdlib/REPL/test/repl.jl index 03f6856720b1a..91edc5a1dd099 100644 --- a/stdlib/REPL/test/repl.jl +++ b/stdlib/REPL/test/repl.jl @@ -264,7 +264,7 @@ fake_repl(options = REPL.Options(confirm_exit=false,hascolor=true)) do stdin_wri write(stdin_write, ";") readuntil(stdout_read, "shell> ") Base.print_shell_escaped(stdin_write, Base.julia_cmd().exec..., special=Base.shell_special) - write(stdin_write, """ -e "println(\\"HI\\")\" """) + write(stdin_write, """ -e "println(\\"HI\\")\"""") readuntil(stdout_read, ")\"") proc_stdout_read, proc_stdout = redirect_stdout() get_stdout = @async read(proc_stdout_read, String) From adf3a58aadf96cfe37da089e3661bbeea6aa5915 Mon Sep 17 00:00:00 2001 From: Bart Janssens Date: Fri, 15 Apr 2022 00:47:21 +0200 Subject: [PATCH 33/40] Fix embedding with MSVC (#44976) (cherry picked from commit c589e0d59541b1240f5bf77c7ce8c22594179e1b) --- src/support/dtypes.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/support/dtypes.h b/src/support/dtypes.h index 46780e8e64d4a..3e2fa18b0a67b 100644 --- a/src/support/dtypes.h +++ b/src/support/dtypes.h @@ -29,6 +29,16 @@ #include #include +#if defined(_COMPILER_MICROSOFT_) && !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED) + +/* See https://github.com/JuliaLang/julia/pull/44587 */ +typedef intptr_t ssize_t; +#define SSIZE_MAX INTPTR_MAX +#define _SSIZE_T_ +#define _SSIZE_T_DEFINED + +#endif /* defined(_COMPILER_MICROSOFT_) && !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED) */ + #if !defined(_COMPILER_GCC_) #define strtoull _strtoui64 From cc31c2fcfa972a0b7e34c301ab670446ddb6f3b9 Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Tue, 1 Feb 2022 16:21:35 -0500 Subject: [PATCH 34/40] fix macro expansion of `(::typeof(x))() = ...` (#43993) (cherry picked from commit b405562935abc5f20b5e38ed06ba271bac79788b) --- src/macroexpand.scm | 22 +++++++++++----------- test/syntax.jl | 4 ++++ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/macroexpand.scm b/src/macroexpand.scm index f1302e57cc4c8..8a42b26fa79a1 100644 --- a/src/macroexpand.scm +++ b/src/macroexpand.scm @@ -271,9 +271,7 @@ (define (other x) (resolve-expansion-vars-with-new-env x env m parent-scope inarg)) (case (car e) ((where) `(where ,(recur (cadr e)) ,@(map other (cddr e)))) - ((|::|) (if (length= e 2) - `(|::| ,(other (cadr e))) - `(|::| ,(recur (cadr e)) ,(other (caddr e))))) + ((|::|) `(|::| ,(recur (cadr e)) ,(other (caddr e)))) ((call) `(call ,(other (cadr e)) ,@(map (lambda (x) (resolve-expansion-vars-with-new-env x env m parent-scope #t)) @@ -457,14 +455,16 @@ ;; decl-var that also identifies f in f()=... (define (decl-var* e) - (cond ((not (pair? e)) e) - ((eq? (car e) 'escape) '()) - ((eq? (car e) 'call) (decl-var* (cadr e))) - ((eq? (car e) '=) (decl-var* (cadr e))) - ((eq? (car e) 'curly) (decl-var* (cadr e))) - ((eq? (car e) '|::|) (decl-var* (cadr e))) - ((eq? (car e) 'where) (decl-var* (cadr e))) - (else (decl-var e)))) + (if (pair? e) + (case (car e) + ((escape) '()) + ((call) (decl-var* (cadr e))) + ((=) (decl-var* (cadr e))) + ((curly) (decl-var* (cadr e))) + ((|::|) (if (length= e 2) '() (decl-var* (cadr e)))) + ((where) (decl-var* (cadr e))) + (else (decl-var e))) + e)) (define (decl-vars* e) (if (and (pair? e) (eq? (car e) 'tuple)) diff --git a/test/syntax.jl b/test/syntax.jl index 0141b1b1068c2..c769bcc0730ab 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -3042,3 +3042,7 @@ end @test x == 1 @test f == 2 end + +let ex = :(const $(esc(:x)) = 1; (::typeof(2))() = $(esc(:x))) + @test macroexpand(Main, Expr(:var"hygienic-scope", ex, Main)).args[3].args[1] == :((::$(GlobalRef(Main, :typeof))(2))()) +end From 5b8d99ac5cc3d246ee8cb5449d4b5ddfc1450b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Mon, 4 Apr 2022 22:11:25 +0200 Subject: [PATCH 35/40] [Zlib_jll] Update to v1.2.12+3 (#44810) Note: this is the first build of the real upstream version 1.2.12 which was released a few days ago. (cherry picked from commit 81e7cfc0b7edaf8da3d892290da5fd20dc2e2a65) --- deps/checksums/zlib | 68 ++++++++++++++++---------------- deps/zlib.version | 4 +- stdlib/Zlib_jll/Project.toml | 2 +- stdlib/Zlib_jll/test/runtests.jl | 2 +- 4 files changed, 38 insertions(+), 38 deletions(-) diff --git a/deps/checksums/zlib b/deps/checksums/zlib index ba31ecdbae00b..d524a3f588a18 100644 --- a/deps/checksums/zlib +++ b/deps/checksums/zlib @@ -1,34 +1,34 @@ -zlib-cacf7f1d4e3d44d871b605da3b647f07d718623f.tar.gz/md5/93d10d4dd040f14ae63417070d1346e8 -zlib-cacf7f1d4e3d44d871b605da3b647f07d718623f.tar.gz/sha512/a1e9c5a2963266a582192d0fe88c179f5239245f11c4df4427dda755ad77d31e1fcf045d7d3fe49141090f4ff8da13d9a2e8d8d317fe6460a5f3e9bdea29b883 -Zlib.v1.2.12+1.aarch64-apple-darwin.tar.gz/md5/6e255e13279855a99dae7d4ccf206069 -Zlib.v1.2.12+1.aarch64-apple-darwin.tar.gz/sha512/d160928dc6cad6bbc9fce36ea0d807c1f432aae375e6a032b0fd58d18640d02fc50c25233b32f8b73f3fc3488a091cf57418ad04498160441e3d7e4aa79302fe -Zlib.v1.2.12+1.aarch64-linux-gnu.tar.gz/md5/ff0ce9d6dec1c1b07114ed48f2bcfc88 -Zlib.v1.2.12+1.aarch64-linux-gnu.tar.gz/sha512/fdcea5e1fccc93641d0c372b6ba041c33c006e84ca6ba532bd9d6bb5ac449379daf27c5e1b95df3a6a57d3c24a363f12e55d5fb92184f1130606000e045a0d9b -Zlib.v1.2.12+1.aarch64-linux-musl.tar.gz/md5/900884b5eb02307665c1e6244f9d4be8 -Zlib.v1.2.12+1.aarch64-linux-musl.tar.gz/sha512/c3cbf7b41566af260a6e4ff2a2206b7f88439f0925609c72f822876eff384e3656e6bcd12131eac47d4177e5a1359ea6ebedbae949682c1d307607588ebfd80c -Zlib.v1.2.12+1.armv6l-linux-gnueabihf.tar.gz/md5/2766764794ae29ff4dc97c42faebbd91 -Zlib.v1.2.12+1.armv6l-linux-gnueabihf.tar.gz/sha512/341262c50ba5117ea93afb4acf3a036ee40a83d9b46b13a8360f36d74561c152d9ffa807887f4c452c65e91cae98df44fed861014ce26c4293ee0f45bafcb87e -Zlib.v1.2.12+1.armv6l-linux-musleabihf.tar.gz/md5/9037801d9524b3912acb5a5d3abfaa87 -Zlib.v1.2.12+1.armv6l-linux-musleabihf.tar.gz/sha512/6984076b0262e7ef19f08e6e83aa855eb6b60ae478dcad985d360b38f52ea6cc0fbf4e5c7723c007b722b01dc70ae378f6d487ddbe934e84ab4376de2688ce86 -Zlib.v1.2.12+1.armv7l-linux-gnueabihf.tar.gz/md5/627bcdf4216e9fb7020dcc50f71402e2 -Zlib.v1.2.12+1.armv7l-linux-gnueabihf.tar.gz/sha512/575000bed533f223ef2551ebdb7b431a743f83bf248edaf0a05ba00d33cf7848481952b325d7e18fdce3b91d2f0ec6fd02b24fb8cfa812f8a511f924a192fd1c -Zlib.v1.2.12+1.armv7l-linux-musleabihf.tar.gz/md5/11c79b0221d07986eeaf016650667059 -Zlib.v1.2.12+1.armv7l-linux-musleabihf.tar.gz/sha512/7f0415e8ebad6690621906885f72d3660962279e4ef57893334406a92f3eb9f6dac177d7430da0f4ae1ab0cabf185b33dbb347e054c35498e94e45771dd4b05a -Zlib.v1.2.12+1.i686-linux-gnu.tar.gz/md5/fc024f3aa4fffb298b6059adc7db6911 -Zlib.v1.2.12+1.i686-linux-gnu.tar.gz/sha512/cb219ecd89adda98f84914a4bc9355ba363bd942c7cd16adba70aa3f8ac37d1f7f812df942294a8eb3fa5ed474ee59126a567dea1f536467087fa27eb66c41b1 -Zlib.v1.2.12+1.i686-linux-musl.tar.gz/md5/5473f0c5ae14d4c34bc51c6ad583f21e -Zlib.v1.2.12+1.i686-linux-musl.tar.gz/sha512/c6380f1b22866dbfb8baaf724bcc33f2db3602741d3ffcdd61a6831740f1e4e4344b4ac4ac020054df06ebefac235f56a034a1d7cbc40e6c19d2e953945725c2 -Zlib.v1.2.12+1.i686-w64-mingw32.tar.gz/md5/1119dbaf451c691028522e43e2ca7f20 -Zlib.v1.2.12+1.i686-w64-mingw32.tar.gz/sha512/366d3ef55e3b448176388f8d92c6ffe00e68f7ae62b67ad1ceedb73984ba30b16c8a086807f61e87caa8262e8ea1cb7799b49d22b0269dcee7735d3ea36df6aa -Zlib.v1.2.12+1.powerpc64le-linux-gnu.tar.gz/md5/127bf2fbb739f52d1d455d9b8dd0b08e -Zlib.v1.2.12+1.powerpc64le-linux-gnu.tar.gz/sha512/cd647435a5ca819180f662f288106ce49521ad75501b7c95ad912f008caa264531f8b62ccc042c0f8f2cb1a728d89d84fef395c9f3797b0f9f111c1f8b8ce1b9 -Zlib.v1.2.12+1.x86_64-apple-darwin.tar.gz/md5/5740e0da15acce6234d54b56bc462529 -Zlib.v1.2.12+1.x86_64-apple-darwin.tar.gz/sha512/1b973091f381cd2d1403685fcc7ca69f31019e2bab6a031cc934bffdf339775bbd529fb375996bdade090ff4cfcf6f2aec6cb9891b91a5b21c3f847f159748a0 -Zlib.v1.2.12+1.x86_64-linux-gnu.tar.gz/md5/750e79f7ad235ee94088ad297c407e36 -Zlib.v1.2.12+1.x86_64-linux-gnu.tar.gz/sha512/ae995d9069eda2ac602eb53cd6d86c22d0d5e353504d1a6525a33efb99628fa4abd40d0dcc16f0927c409d5c57b6f7d63208d2aae01474665f9f93114bd1388a -Zlib.v1.2.12+1.x86_64-linux-musl.tar.gz/md5/bb62d2d9f6800c36183d2f2e6e094f42 -Zlib.v1.2.12+1.x86_64-linux-musl.tar.gz/sha512/d2ba384a1d31cf0f3cb6bc843d43005c39a72007954bc58bfa24c5d6d65af10ae2969670baecd854c8074f94424288f3fb29f735c9226f7f8a2df49eb62e6033 -Zlib.v1.2.12+1.x86_64-unknown-freebsd.tar.gz/md5/21dfda8d26dbe76c914216e79d7847d6 -Zlib.v1.2.12+1.x86_64-unknown-freebsd.tar.gz/sha512/2cd7be4070dbf20ab1c46553a9e3f84c98bf8e8fc72bf2eb4678630e648cb9ad02cae5e004f3c2a69216e2782d9bba43eac6a45a480f6fe58d1091a9fbba93ff -Zlib.v1.2.12+1.x86_64-w64-mingw32.tar.gz/md5/140ddbeeaf27867aeeeec118682e879d -Zlib.v1.2.12+1.x86_64-w64-mingw32.tar.gz/sha512/f61f3d1eb7e7960b2fdbc1d68f22526a06ba598cd821261e7ba3819e00daee4c5b5427f9c03277b57b7226860142f0071410c0583535ca4e4b9acbe5ee4b5ade +Zlib.v1.2.12+3.aarch64-apple-darwin.tar.gz/md5/2258883a6412fbdac0b807afd133834f +Zlib.v1.2.12+3.aarch64-apple-darwin.tar.gz/sha512/6e82b57646dfe2b86978d51cb4401d565d00d6bdcfabe09ceb888ad8979bd1398fd9ea7652542f149d88c120110f6c3baa919616f01410e9238a5199f50f5dda +Zlib.v1.2.12+3.aarch64-linux-gnu.tar.gz/md5/663aa0d0791b92464e4822a130ac7fa9 +Zlib.v1.2.12+3.aarch64-linux-gnu.tar.gz/sha512/e50f00d92600a78b2f540e0e8e1dce435d0d0499ea80ce3c3cd0e11c8e3b5b1a97eadca9ac863f597cee369e80bcd50ec1c0a0e0f1a87bb0ff94bbaf453dea2d +Zlib.v1.2.12+3.aarch64-linux-musl.tar.gz/md5/471179a2364d59abb6426b378ea4e195 +Zlib.v1.2.12+3.aarch64-linux-musl.tar.gz/sha512/35208e4be5966343ecb2b78471a3e1a947489f83c828b562db3508506dd0493eae3318c7eb3a6b599e911416795023193df862fbb6fcc7389d44710dc30f16a8 +Zlib.v1.2.12+3.armv6l-linux-gnueabihf.tar.gz/md5/53601c0201dadc8c9ff038167d5c4277 +Zlib.v1.2.12+3.armv6l-linux-gnueabihf.tar.gz/sha512/19744283bb412a656b934347cb7a1d121fbaf7e5f9b1aac373ddf2466567b731817a2e72e3a4d993ca7e5b5eb1fd9bb9c24d0126778367b28bdb94721649298b +Zlib.v1.2.12+3.armv6l-linux-musleabihf.tar.gz/md5/f7c923955fc600785aae455807e63c8b +Zlib.v1.2.12+3.armv6l-linux-musleabihf.tar.gz/sha512/623cd1758465c9e40b0dad93981ae93097a03f4aa67487b7e1c7240be2d780d86f35f8db96743c35bbb329d572741b58e73735a2b1cfb9e18e77f4dbcc714063 +Zlib.v1.2.12+3.armv7l-linux-gnueabihf.tar.gz/md5/5ce0fe42f67e09de047626424d61bc82 +Zlib.v1.2.12+3.armv7l-linux-gnueabihf.tar.gz/sha512/322e32d6fe6cd7a3334f5146f8980d4f1fc85b9a1c60271659ba8b4bbfdec314f8d9e8c6c0719248f5dd18e3daefd946811a3dcc74fa3ae5505d6dd653e65309 +Zlib.v1.2.12+3.armv7l-linux-musleabihf.tar.gz/md5/5115c374df90393cb895dd45c77275c4 +Zlib.v1.2.12+3.armv7l-linux-musleabihf.tar.gz/sha512/b04b4f42220833b99923a3ff349e4a05ad9f67c2b62d4848de37c833b287420b1dbec8a039c09d2a95ab6b68a62c6dcbacb4ba7cc069a4e90a11f8592719d2b8 +Zlib.v1.2.12+3.i686-linux-gnu.tar.gz/md5/37e0186f765fada0d76b9cd6f28c8d5d +Zlib.v1.2.12+3.i686-linux-gnu.tar.gz/sha512/1239675bbf46c6243131585283b0fc23baa32e68226fbb2f0b7a833c8979e2df33590947daade533e37bafe21838a10198e9f9de99e094c21fba6b218b2fceab +Zlib.v1.2.12+3.i686-linux-musl.tar.gz/md5/a0d92af6481929eed3a9fec3dbb2e622 +Zlib.v1.2.12+3.i686-linux-musl.tar.gz/sha512/b448590129ef251083b675c3d7494a90151a03297fd9883efb70bde032d106f16f2ec7c28508d9b4a0d0e5a0be0bdb4bcf0d1a9e4b2ade034a6d6cfc4916536e +Zlib.v1.2.12+3.i686-w64-mingw32.tar.gz/md5/cc38d9ec5430e2ed7fed4792c7ac9551 +Zlib.v1.2.12+3.i686-w64-mingw32.tar.gz/sha512/85ad3babb42682d7b2b69513a30fd5e992a56436dcd7e2a44800bf1bc30d60d09aff5769cfaeefd4f5668e7973a0c2d4ad4d28559ea5f28c1c5419ed595eae57 +Zlib.v1.2.12+3.powerpc64le-linux-gnu.tar.gz/md5/8f57d8c31d2355c64a05db0412462d58 +Zlib.v1.2.12+3.powerpc64le-linux-gnu.tar.gz/sha512/9a0208c7a4dbf71b6f7e1ccaf05e3f3a422507cf0431b6482aab1a7b1bea41bd135320567f7dba6666f37c26f48cb3a627f1a1ebd39bf5c2d61148aadf62a986 +Zlib.v1.2.12+3.x86_64-apple-darwin.tar.gz/md5/5d15bb591d26d24aa9d6c9c8cf3df097 +Zlib.v1.2.12+3.x86_64-apple-darwin.tar.gz/sha512/7d8b0ec5a46a85cef3c5de451823c5cfa73b5b7c5ac98699065bbc5692af556195664908cd5c35184b7a9586fc0adab41fc0f76ee8599ca09a740cf49b9be113 +Zlib.v1.2.12+3.x86_64-linux-gnu.tar.gz/md5/25df63b9e6cbef14b0f0bf2a9eec5d14 +Zlib.v1.2.12+3.x86_64-linux-gnu.tar.gz/sha512/2660b762d816491e6b877020d8dd4a1cf1b171d6232dd5e0f47c6ee7b15504b006cc8f051434df778e0910130ef7456e30d531464470d3c4a2502e8f9fd19e76 +Zlib.v1.2.12+3.x86_64-linux-musl.tar.gz/md5/3f0c85d248711608141046d15b2da339 +Zlib.v1.2.12+3.x86_64-linux-musl.tar.gz/sha512/e4256b1b9520d5b0d97fa7e7ca6f6b9aa2583c6e5f14967392d54e48f27e242461f77e522743b229ab9b333eec5fd51f6d7b1559b566bd68ca0741b05b96df3c +Zlib.v1.2.12+3.x86_64-unknown-freebsd.tar.gz/md5/e67dae1456645930c9e2b2fef6f805c8 +Zlib.v1.2.12+3.x86_64-unknown-freebsd.tar.gz/sha512/5915ec48ae80be829c36a71e2ce580d2d14b7a9824c8f279ad5c69fea62d9a03345b665f224b9dde0bc4b808af246f89ec4f932d47a14236bc3b7db7651e5bec +Zlib.v1.2.12+3.x86_64-w64-mingw32.tar.gz/md5/89b152b3de0068c7c2580b87ad529ed3 +Zlib.v1.2.12+3.x86_64-w64-mingw32.tar.gz/sha512/df4b585f6501f45bc85e8d00c1b03c482d70d3491081246f9e9f9560f90c5f6057b1174a81e653f725209323cd743cf05d3e1aba1385afd26cb6f8c50186f818 +zlib-21767c654d31d2dccdde4330529775c6c5fd5389.tar.gz/md5/1fb2320f871561306bc87b3894727b45 +zlib-21767c654d31d2dccdde4330529775c6c5fd5389.tar.gz/sha512/2ad1e728f97a81b65d24fe5bef66658c94222d717a3486a0d11682b61563d7eaaa578f7457078881e8ed8c91b87aec11634d4a64021546e23a3ecabb3285197a diff --git a/deps/zlib.version b/deps/zlib.version index e363169315051..0b16a7f662dd1 100644 --- a/deps/zlib.version +++ b/deps/zlib.version @@ -1,2 +1,2 @@ -ZLIB_BRANCH=v1.2.11 -ZLIB_SHA1=cacf7f1d4e3d44d871b605da3b647f07d718623f +ZLIB_BRANCH=v1.2.12 +ZLIB_SHA1=21767c654d31d2dccdde4330529775c6c5fd5389 diff --git a/stdlib/Zlib_jll/Project.toml b/stdlib/Zlib_jll/Project.toml index e5ee91ef281dc..60a2966a562fb 100644 --- a/stdlib/Zlib_jll/Project.toml +++ b/stdlib/Zlib_jll/Project.toml @@ -1,6 +1,6 @@ name = "Zlib_jll" uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.12+1" +version = "1.2.12+3" [deps] Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" diff --git a/stdlib/Zlib_jll/test/runtests.jl b/stdlib/Zlib_jll/test/runtests.jl index e6adc6b7c951f..cc9e64188a0aa 100644 --- a/stdlib/Zlib_jll/test/runtests.jl +++ b/stdlib/Zlib_jll/test/runtests.jl @@ -3,5 +3,5 @@ using Test, Zlib_jll @testset "Zlib_jll" begin - @test VersionNumber(unsafe_string(ccall((:zlibVersion, libz), Cstring, ()))) == v"1.2.11" + @test VersionNumber(unsafe_string(ccall((:zlibVersion, libz), Cstring, ()))) == v"1.2.12" end From 8d13430448cd94d73af5a53de058485c48f9c9f3 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Wed, 13 Apr 2022 16:26:36 -0400 Subject: [PATCH 36/40] asyncevents: fix missing GC root and race (#44956) The event might have triggered on another thread before we observed it here, or it might have gotten finalized before it got triggered. Either outcome can result in a lost event. (I observed the later situation occurring locally during the Dates test once). (cherry picked from commit 8cc00ffd1c7851003acec419e01a4896f9ed88ad) --- base/asyncevent.jl | 72 +++++++++++++++++++++++++++++----------------- 1 file changed, 46 insertions(+), 26 deletions(-) diff --git a/base/asyncevent.jl b/base/asyncevent.jl index ca0e5da512147..08d32e0eac250 100644 --- a/base/asyncevent.jl +++ b/base/asyncevent.jl @@ -43,13 +43,22 @@ the async condition object itself. """ function AsyncCondition(cb::Function) async = AsyncCondition() - t = @task while _trywait(async) - cb(async) - isopen(async) || return + t = @task begin + unpreserve_handle(async) + while _trywait(async) + cb(async) + isopen(async) || return + end + end + # here we are mimicking parts of _trywait, in coordination with task `t` + preserve_handle(async) + @lock async.cond begin + if async.set + schedule(t) + else + _wait2(async.cond, t) + end end - lock(async.cond) - _wait2(async.cond, t) - unlock(async.cond) return async end @@ -103,7 +112,11 @@ unsafe_convert(::Type{Ptr{Cvoid}}, async::AsyncCondition) = async.handle function _trywait(t::Union{Timer, AsyncCondition}) set = t.set - if !set + if set + # full barrier now for AsyncCondition + t isa Timer || Core.Intrinsics.atomic_fence(:acquire_release) + else + t.isopen || return false t.handle == C_NULL && return false iolock_begin() set = t.set @@ -112,14 +125,12 @@ function _trywait(t::Union{Timer, AsyncCondition}) lock(t.cond) try set = t.set - if !set - if t.handle != C_NULL - iolock_end() - set = wait(t.cond) - unlock(t.cond) - iolock_begin() - lock(t.cond) - end + if !set && t.isopen && t.handle != C_NULL + iolock_end() + set = wait(t.cond) + unlock(t.cond) + iolock_begin() + lock(t.cond) end finally unlock(t.cond) @@ -255,19 +266,28 @@ julia> begin """ function Timer(cb::Function, timeout::Real; interval::Real=0.0) timer = Timer(timeout, interval=interval) - t = @task while _trywait(timer) - try - cb(timer) - catch err - write(stderr, "Error in Timer:\n") - showerror(stderr, err, catch_backtrace()) - return + t = @task begin + unpreserve_handle(timer) + while _trywait(timer) + try + cb(timer) + catch err + write(stderr, "Error in Timer:\n") + showerror(stderr, err, catch_backtrace()) + return + end + isopen(timer) || return + end + end + # here we are mimicking parts of _trywait, in coordination with task `t` + preserve_handle(timer) + @lock timer.cond begin + if timer.set + schedule(t) + else + _wait2(timer.cond, t) end - isopen(timer) || return end - lock(timer.cond) - _wait2(timer.cond, t) - unlock(timer.cond) return timer end From 6e5b031082b23995914d58f570daaabc321a943a Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Sun, 27 Mar 2022 02:05:55 -0400 Subject: [PATCH 37/40] fix oc lowering with return type annotations (#44727) fixes #44723 Co-authored-by: Takafumi Arakaki (cherry picked from commit 19eb3073561266f5e1699e9f4f9d52c65b42d76f) --- src/julia-syntax.scm | 20 ++++++++++++-------- test/syntax.jl | 4 ++++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/julia-syntax.scm b/src/julia-syntax.scm index d1f681479bc55..852af7c704b17 100644 --- a/src/julia-syntax.scm +++ b/src/julia-syntax.scm @@ -4018,7 +4018,7 @@ f(x) = yt(x) (cons (car e) (map-cl-convert (cdr e) fname lam namemap defined toplevel interp opaq)))))))) -(define (closure-convert e) (cl-convert e #f #f #f #f #f #f #f)) +(define (closure-convert e) (cl-convert e #f #f (table) (table) #f #f #f)) ;; pass 5: convert to linear IR @@ -4118,17 +4118,21 @@ f(x) = yt(x) (loop (cdr s)))))) `(pop_exception ,restore-token)))) (define (emit-return x) - (define (actually-return x) - (let* ((x (if rett - (compile (convert-for-type-decl x rett) '() #t #f) - x)) - (tmp (if ((if (null? catch-token-stack) valid-ir-return? simple-atom?) x) + (define (emit- x) + (let* ((tmp (if ((if (null? catch-token-stack) valid-ir-return? simple-atom?) x) #f (make-ssavalue)))) - (if tmp (emit `(= ,tmp ,x))) + (if tmp + (begin (emit `(= ,tmp ,x)) tmp) + x))) + (define (actually-return x) + (let* ((x (if rett + (compile (convert-for-type-decl (emit- x) rett) '() #t #f) + x)) + (x (emit- x))) (let ((pexc (pop-exc-expr catch-token-stack '()))) (if pexc (emit pexc))) - (emit `(return ,(or tmp x))))) + (emit `(return ,x)))) (if x (if (> handler-level 0) (let ((tmp (cond ((and (simple-atom? x) (or (not (ssavalue? x)) (not finally-handler))) #f) diff --git a/test/syntax.jl b/test/syntax.jl index c769bcc0730ab..be2f7e05af68f 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -3046,3 +3046,7 @@ end let ex = :(const $(esc(:x)) = 1; (::typeof(2))() = $(esc(:x))) @test macroexpand(Main, Expr(:var"hygienic-scope", ex, Main)).args[3].args[1] == :((::$(GlobalRef(Main, :typeof))(2))()) end + +# issue 44723 +demo44723()::Any = Base.Experimental.@opaque () -> true ? 1 : 2 +@test demo44723()() == 1 From a6c46742c8cea7758af679b983970aa5916d65ff Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Thu, 25 Nov 2021 17:29:08 +0100 Subject: [PATCH 38/40] Multiversioning: support for aliases (from at-ccallable). (#37530) (cherry picked from commit 4170090765435726c9b81fa0236e256a4062b7a9) --- src/llvm-multiversioning.cpp | 73 ++++++++++++++++++++++++++++++++---- 1 file changed, 65 insertions(+), 8 deletions(-) diff --git a/src/llvm-multiversioning.cpp b/src/llvm-multiversioning.cpp index 3fcd241c14088..b9853eb917ca9 100644 --- a/src/llvm-multiversioning.cpp +++ b/src/llvm-multiversioning.cpp @@ -272,13 +272,13 @@ struct CloneCtx { Constant *get_ptrdiff32(Constant *ptr, Constant *base) const; template Constant *emit_offset_table(const std::vector &vars, StringRef name) const; + void rewrite_alias(GlobalAlias *alias, Function* F); LLVMContext &ctx; Type *T_size; Type *T_int32; Type *T_void; PointerType *T_psize; - PointerType *T_pvoidfunc; MDNode *tbaa_const; MultiVersioning *pass; std::vector specs; @@ -295,6 +295,8 @@ struct CloneCtx { std::vector> gv_relocs{}; // Mapping from function id (i.e. 0-based index in `fvars`) to GVs to be initialized. std::map const_relocs; + // Functions that were referred to by a global alias, and might not have other uses. + std::set alias_relocs; bool has_veccall{false}; bool has_cloneall{false}; }; @@ -342,7 +344,6 @@ CloneCtx::CloneCtx(MultiVersioning *pass, Module &M) T_int32(Type::getInt32Ty(ctx)), T_void(Type::getVoidTy(ctx)), T_psize(PointerType::get(T_size, 0)), - T_pvoidfunc(FunctionType::get(T_void, false)->getPointerTo()), tbaa_const(tbaa_make_child("jtbaa_const", nullptr, true).first), pass(pass), specs(jl_get_llvm_clone_targets()), @@ -697,6 +698,54 @@ Constant *CloneCtx::rewrite_gv_init(const Stack& stack) return res; } +// replace an alias to a function with a trampoline and (uninitialized) global variable slot +void CloneCtx::rewrite_alias(GlobalAlias *alias, Function *F) +{ + assert(!is_vector(F->getFunctionType())); + + Function *trampoline = + Function::Create(F->getFunctionType(), alias->getLinkage(), "", &M); + trampoline->copyAttributesFrom(F); + trampoline->takeName(alias); + alias->eraseFromParent(); + + uint32_t id; + GlobalVariable *slot; + std::tie(id, slot) = get_reloc_slot(F); + for (auto &grp: groups) { + grp.relocs.insert(id); + for (auto &tgt: grp.clones) { + tgt.relocs.insert(id); + } + } + alias_relocs.insert(id); + + auto BB = BasicBlock::Create(ctx, "top", trampoline); + IRBuilder<> irbuilder(BB); + + auto ptr = irbuilder.CreateLoad(F->getType(), slot); + ptr->setMetadata(llvm::LLVMContext::MD_tbaa, tbaa_const); + ptr->setMetadata(llvm::LLVMContext::MD_invariant_load, MDNode::get(ctx, None)); + + std::vector Args; + for (auto &arg : trampoline->args()) + Args.push_back(&arg); + auto call = irbuilder.CreateCall(F->getFunctionType(), ptr, makeArrayRef(Args)); + if (F->isVarArg()) +#if (defined(_CPU_ARM_) || defined(_CPU_PPC_) || defined(_CPU_PPC64_)) + abort(); // musttail support is very bad on ARM, PPC, PPC64 (as of LLVM 3.9) +#else + call->setTailCallKind(CallInst::TCK_MustTail); +#endif + else + call->setTailCallKind(CallInst::TCK_Tail); + + if (F->getReturnType() == T_void) + irbuilder.CreateRetVoid(); + else + irbuilder.CreateRet(call); +} + void CloneCtx::fix_gv_uses() { auto single_pass = [&] (Function *orig_f) { @@ -707,8 +756,14 @@ void CloneCtx::fix_gv_uses() auto info = uses.get_info(); // We only support absolute pointer relocation. assert(info.samebits); - // And only for non-constant global variable initializers - auto val = cast(info.val); + GlobalVariable *val; + if (auto alias = dyn_cast(info.val)) { + rewrite_alias(alias, orig_f); + continue; + } + else { + val = cast(info.val); + } assert(info.use->getOperandNo() == 0); assert(!val->isConstant()); auto fid = get_func_id(orig_f); @@ -734,8 +789,8 @@ std::pair CloneCtx::get_reloc_slot(Function *F) auto id = get_func_id(F); auto &slot = const_relocs[id]; if (!slot) - slot = new GlobalVariable(M, T_pvoidfunc, false, GlobalVariable::InternalLinkage, - ConstantPointerNull::get(T_pvoidfunc), + slot = new GlobalVariable(M, F->getType(), false, GlobalVariable::InternalLinkage, + ConstantPointerNull::get(F->getType()), F->getName() + ".reloc_slot"); return std::make_pair(id, slot); } @@ -815,10 +870,9 @@ void CloneCtx::fix_inst_uses() uint32_t id; GlobalVariable *slot; std::tie(id, slot) = get_reloc_slot(orig_f); - Instruction *ptr = new LoadInst(T_pvoidfunc, slot, "", false, insert_before); + Instruction *ptr = new LoadInst(orig_f->getType(), slot, "", false, insert_before); ptr->setMetadata(llvm::LLVMContext::MD_tbaa, tbaa_const); ptr->setMetadata(llvm::LLVMContext::MD_invariant_load, MDNode::get(ctx, None)); - ptr = new BitCastInst(ptr, F->getType(), "", insert_before); use_i->setOperand(info.use->getOperandNo(), rewrite_inst_use(uses.get_stack(), ptr, insert_before)); @@ -955,6 +1009,9 @@ void CloneCtx::emit_metadata() values.push_back(id_v); values.push_back(get_ptrdiff32(it->second, gbase)); } + if (alias_relocs.find(id) != alias_relocs.end()) { + shared_relocs.insert(id); + } } values[0] = ConstantInt::get(T_int32, values.size() / 2); ArrayType *vars_type = ArrayType::get(T_int32, values.size()); From ccf78165e3d0db690934864a9a9f407de8878071 Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Wed, 23 Mar 2022 11:14:15 +0100 Subject: [PATCH 39/40] avoid using `@sync_add` on remotecalls (#44671) * avoid using `@sync_add` on remotecalls It seems like @sync_add adds the Futures to a queue (Channel) for @sync, which in turn calls wait() for all the futures synchronously. Not only that is slightly detrimental for network operations (latencies add up), but in case of Distributed the call to wait() may actually cause some compilation on remote processes, which is also wait()ed for. In result, some operations took a great amount of "serial" processing time if executed on many workers at once. For me, this closes #44645. The major change can be illustrated as follows: First add some workers: ``` using Distributed addprocs(10) ``` and then trigger something that, for example, causes package imports on the workers: ``` using SomeTinyPackage ``` In my case (importing UnicodePlots on 10 workers), this improves the loading time over 10 workers from ~11s to ~5.5s. This is a far bigger issue when worker count gets high. The time of the processing on each worker is usually around 0.3s, so triggering this problem even on a relatively small cluster (64 workers) causes a really annoying delay, and running `@everywhere` for the first time on reasonable clusters (I tested with 1024 workers, see #44645) usually takes more than 5 minutes. Which sucks. Anyway, on 64 workers this reduces the "first import" time from ~30s to ~6s, and on 1024 workers this seems to reduce the time from over 5 minutes (I didn't bother to measure that precisely now, sorry) to ~11s. Related issues: - Probably fixes #39291. - #42156 is a kinda complementary -- it removes the most painful source of slowness (the 0.3s precompilation on the workers), but the fact that the wait()ing is serial remains a problem if the network latencies are high. May help with #38931 Co-authored-by: Valentin Churavy (cherry picked from commit 62e0729dbc5f9d5d93d14dcd49457f02a0c6d3a7) --- base/task.jl | 37 +++++++++++++++++++++- stdlib/Distributed/src/Distributed.jl | 4 +-- stdlib/Distributed/src/clusterserialize.jl | 2 +- stdlib/Distributed/src/macros.jl | 4 +-- 4 files changed, 41 insertions(+), 6 deletions(-) diff --git a/base/task.jl b/base/task.jl index b25197e0aadcc..8323edb6d2263 100644 --- a/base/task.jl +++ b/base/task.jl @@ -418,6 +418,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))) @@ -426,7 +432,7 @@ macro async(expr) let $(letargs...) local task = Task($thunk) if $(Expr(:islocal, var)) - put!($var, task) + put!($var, $(wrap(:task))) end schedule(task) task @@ -434,6 +440,35 @@ macro async(expr) 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 + """ errormonitor(t::Task) diff --git a/stdlib/Distributed/src/Distributed.jl b/stdlib/Distributed/src/Distributed.jl index 53572c441f09e..49849a53ce2c3 100644 --- a/stdlib/Distributed/src/Distributed.jl +++ b/stdlib/Distributed/src/Distributed.jl @@ -10,7 +10,7 @@ import Base: getindex, wait, put!, take!, fetch, isready, push!, length, hash, ==, kill, close, isopen, showerror # imports for use -using Base: Process, Semaphore, JLOptions, buffer_writes, @sync_add, +using Base: Process, Semaphore, JLOptions, buffer_writes, @async_unwrap, VERSION_STRING, binding_module, atexit, julia_exename, julia_cmd, AsyncGenerator, acquire, release, invokelatest, shell_escape_posixly, shell_escape_wincmd, escape_microsoft_c_args, @@ -75,7 +75,7 @@ function _require_callback(mod::Base.PkgId) # broadcast top-level (e.g. from Main) import/using from node 1 (only) @sync for p in procs() p == 1 && continue - @sync_add remotecall(p) do + @async_unwrap remotecall_wait(p) do Base.require(mod) nothing end diff --git a/stdlib/Distributed/src/clusterserialize.jl b/stdlib/Distributed/src/clusterserialize.jl index e37987c5bf875..28025ae867c78 100644 --- a/stdlib/Distributed/src/clusterserialize.jl +++ b/stdlib/Distributed/src/clusterserialize.jl @@ -243,7 +243,7 @@ An exception is raised if a global constant is requested to be cleared. """ function clear!(syms, pids=workers(); mod=Main) @sync for p in pids - @sync_add remotecall(clear_impl!, p, syms, mod) + @async_unwrap remotecall_wait(clear_impl!, p, syms, mod) end end clear!(sym::Symbol, pid::Int; mod=Main) = clear!([sym], [pid]; mod=mod) diff --git a/stdlib/Distributed/src/macros.jl b/stdlib/Distributed/src/macros.jl index 24a24f4c08ed4..6688ca1deb444 100644 --- a/stdlib/Distributed/src/macros.jl +++ b/stdlib/Distributed/src/macros.jl @@ -222,10 +222,10 @@ function remotecall_eval(m::Module, procs, ex) if pid == myid() run_locally += 1 else - @sync_add remotecall(Core.eval, pid, m, ex) + @async_unwrap remotecall_wait(Core.eval, pid, m, ex) end end - yield() # ensure that the remotecall_fetch have had a chance to start + yield() # ensure that the remotecalls have had a chance to start # execute locally last as we do not want local execution to block serialization # of the request to remote nodes. From 86e06d37637484da9d8c987c623caa58b0ca88ff Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Sat, 19 Feb 2022 12:45:05 -0500 Subject: [PATCH 40/40] fix #44239, regression in keyword args in getindex (#44246) (cherry picked from commit 4061e8f898c91d58a117b48a8e9f47260211b962) --- src/julia-syntax.scm | 16 ++++++++++++---- test/syntax.jl | 11 +++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/julia-syntax.scm b/src/julia-syntax.scm index 852af7c704b17..9559f3c46e57c 100644 --- a/src/julia-syntax.scm +++ b/src/julia-syntax.scm @@ -120,6 +120,10 @@ ;; inside ref only replace within the first argument (list* 'ref (replace-beginend (cadr ex) a n tuples last) (cddr ex))) + ;; TODO: this probably should not be allowed since keyword args aren't + ;; positional, but in this context we have just used their positions anyway + ((eq? (car ex) 'kw) + (list 'kw (cadr ex) (replace-beginend (caddr ex) a n tuples last))) (else (cons (car ex) (map (lambda (x) (replace-beginend x a n tuples last)) @@ -142,16 +146,20 @@ (idx (if (vararg? idx0) (cadr idx0) idx0)) (last (null? (cdr lst))) (replaced (replace-beginend idx a n tuples last)) - (idx (if (or (not has-va?) (simple-atom? replaced)) replaced (make-ssavalue)))) + (val (if (kwarg? replaced) (caddr replaced) replaced)) + (idx (if (or (not has-va?) (simple-atom? val)) + val (make-ssavalue)))) (loop (cdr lst) (+ n 1) - (if (eq? idx replaced) + (if (eq? idx val) stmts - (cons `(= ,idx ,replaced) + (cons `(= ,idx ,val) stmts)) (if (vararg? idx0) (cons idx tuples) tuples) (cons (if (vararg? idx0) `(... ,idx) - idx) + (if (eq? val replaced) + idx + (list 'kw (cadr replaced) idx))) ret))))))) ;; GF method does not need to keep decl expressions on lambda args diff --git a/test/syntax.jl b/test/syntax.jl index be2f7e05af68f..880e0cbed978f 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -1212,6 +1212,17 @@ let a = [], b = [4,3,2,1] @test a == [1,2] end +# issue #44239 +struct KWGetindex end +Base.getindex(::KWGetindex, args...; kws...) = (args, NamedTuple(kws)) +let A = KWGetindex(), a = [], b = [4,3,2,1] + f() = (push!(a, 1); 2) + g() = (push!(a, 2); ()) + @test A[f(), g()..., k = f()] === ((2,), (k = 2,)) + @test a == [1, 2, 1] + @test A[var"end"=1] === ((), (var"end" = 1,)) +end + @testset "raw_str macro" begin @test raw"$" == "\$" @test raw"\n" == "\\n"