Skip to content

Commit 6f77e2a

Browse files
authored
Backports release 1.10.5 (#54851)
Backported PRs: - [x] #51351 <!-- Remove boxing in pinv --> - [x] #52678 <!-- Profile: Improve module docstring --> - [x] #54201 <!-- Fix generic triangular solves with empty matrices --> - [x] #54605 <!-- Allow libquadmath to also fail as it is not available on all systems --> - [x] #54634 <!-- Fix trampoline assembly for build on clang 18 on apple silicon --> - [x] #54635 <!-- Aggressive constprop in trevc! to stabilize triangular eigvec --> - [x] #54645 <!-- ensure we set the right value to gc_first_tid --> - [x] #54671 <!-- Add boundscheck in bindingkey_eq to avoid OOB access due to data race --> - [x] #54672 <!-- make: Fix `sed` command for LLVM libraries with no symbol versioning --> - [x] #54704 <!-- LazyString in reinterpretarray error messages --> - [x] #54713 <!-- make: use `readelf` for LLVM symbol version detection --> - [x] #54781 <!-- [LinearAlgebra] Improve resilience to unknown libblastrampoline flags --> - [x] #54837 <!-- Do not add type tag size to the `alloc_typed` lowering for GC allocations --> - [x] #54815 <!-- add sticky task warning to `@task` and `schedule` --> - [x] #55141 <!-- Update the aarch64 devdocs to reflect the current state of its support --> - [x] #55178 <!-- Compat for `Base.@nospecializeinfer` --> - [x] #55197 <!-- compat notice for a[begin] indexing --> - [x] #55209 <!-- correction to compat notice for a[begin] --> - [x] #55203 <!-- document mutable struct const fields --> - [x] #54769 <!-- add missing compat entry to edit --> - [x] #54791 <!-- Bump libblastrampoline to v5.10.1 --> - [x] #55070 <!-- LinearAlgebra: LazyString in error messages for Diagonal/Bidiagonal --> - [x] #54624 <!-- more precise aliasing checks for SubArray --> - [x] #54690 <!-- Fix assertion/crash when optimizing function with dead basic block --> - [x] #55084 <!-- Use triple quotes in TOML.print when string contains newline --> Need manual backport: - [ ] #52505 <!-- fix alignment of emit_unbox_store copy --> - [ ] #53373 <!-- fix sysimage-native-code=no option with pkgimages --> - [ ] #53984 <!-- Profile: fix heap snapshot is valid char check --> - [ ] #54276 <!-- Fix solve for complex `Hermitian` with non-vanishing imaginary part on diagonal --> - [ ] #54669 <!-- Improve error message in inplace transpose --> - [ ] #54871 <!-- Make warn missed transformations pass optional --> Contains multiple commits, manual intervention needed: - [ ] #52854 <!-- Change to streaming out the heap snapshot data --> - [ ] #53218 <!-- Fix interpreter_exec.jl test --> - [ ] #53833 <!-- Profile: make heap snapshots viewable in vscode viewer --> - [ ] #54303 <!-- LinearAlgebra: improve type-inference in Symmetric/Hermitian matmul --> - [ ] #52694 <!-- Reinstate similar for AbstractQ for backward compatibility --> - [ ] #54737 <!-- LazyString in interpolated error messages involving types --> - [ ] #54738 <!-- serialization: fix relocatability bug --> - [ ] #55052 <!-- Fix `(l/r)mul!` with `Diagonal`/`Bidiagonal` --> Non-merged PRs with backport label: - [ ] #55220 <!-- `isfile_casesensitive` fixes on Windows --> - [ ] #55169 <!-- `propertynames` for SVD respects private argument --> - [ ] #55013 <!-- [docs] change docstring to match code --> - [ ] #51479 <!-- prevent code loading from lookin in the versioned environment when building Julia --> - [ ] #50813 <!-- More doctests for Sockets and capitalization fix --> - [ ] #50157 <!-- improve docs for `@inbounds` and `Base.@propagate_inbounds` --> - [ ] #41244 <!-- Fix shell `cd` error when working dir has been deleted -->
2 parents 4954197 + 5b677f9 commit 6f77e2a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+530
-245
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ win-extras:
649649
ifeq ($(USE_SYSTEM_LLVM), 1)
650650
LLVM_SIZE := llvm-size$(EXE)
651651
else
652-
LLVM_SIZE := $(build_depsbindir)/llvm-size$(EXE)
652+
LLVM_SIZE := PATH=$(build_bindir):$$PATH; $(build_depsbindir)/llvm-size$(EXE)
653653
endif
654654
build-stats:
655655
ifeq ($(USE_BINARYBUILDER_LLVM),1)

base/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,12 @@ endif
243243
ifneq (,$(LIBGFORTRAN_VERSION))
244244
$(eval $(call symlink_system_library,CSL,libgfortran,$(LIBGFORTRAN_VERSION)))
245245
endif
246-
$(eval $(call symlink_system_library,CSL,libquadmath,0))
247246
$(eval $(call symlink_system_library,CSL,libstdc++,6))
248-
# We allow libssp, libatomic and libgomp to fail as they are not available on all systems
247+
# We allow libssp, libatomic, libgomp and libquadmath to fail as they are not available on all systems
249248
$(eval $(call symlink_system_library,CSL,libssp,0,ALLOW_FAILURE))
250249
$(eval $(call symlink_system_library,CSL,libatomic,1,ALLOW_FAILURE))
251250
$(eval $(call symlink_system_library,CSL,libgomp,1,ALLOW_FAILURE))
251+
$(eval $(call symlink_system_library,CSL,libquadmath,0,ALLOW_FAILURE))
252252
$(eval $(call symlink_system_library,PCRE,libpcre2-8))
253253
$(eval $(call symlink_system_library,DSFMT,libdSFMT))
254254
$(eval $(call symlink_system_library,LIBBLASTRAMPOLINE,libblastrampoline))

base/abstractarray.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2891,7 +2891,7 @@ end
28912891
@inline function _stack_size_check(x, ax1::Tuple)
28922892
if _iterator_axes(x) != ax1
28932893
uax1 = map(UnitRange, ax1)
2894-
uaxN = map(UnitRange, axes(x))
2894+
uaxN = map(UnitRange, _iterator_axes(x))
28952895
throw(DimensionMismatch(
28962896
LazyString("stack expects uniform slices, got axes(x) == ", uaxN, " while first had ", uax1)))
28972897
end

base/docs/basedocs.jl

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,11 @@ Usually `begin` will not be necessary, since keywords such as [`function`](@ref)
13351335
implicitly begin blocks of code. See also [`;`](@ref).
13361336
13371337
`begin` may also be used when indexing to represent the first index of a
1338-
collection or the first index of a dimension of an array.
1338+
collection or the first index of a dimension of an array. For example,
1339+
`a[begin]` is the first element of an array `a`.
1340+
1341+
!!! compat "Julia 1.4"
1342+
Use of `begin` as an index requires Julia 1.4 or later.
13391343
13401344
# Examples
13411345
```jldoctest
@@ -1396,8 +1400,20 @@ kw"struct"
13961400
mutable struct
13971401
13981402
`mutable struct` is similar to [`struct`](@ref), but additionally allows the
1399-
fields of the type to be set after construction. See the manual section on
1400-
[Composite Types](@ref) for more information.
1403+
fields of the type to be set after construction.
1404+
1405+
Individual fields of a mutable struct can be marked as `const` to make them immutable:
1406+
1407+
```julia
1408+
mutable struct Baz
1409+
a::Int
1410+
const b::Float64
1411+
end
1412+
```
1413+
!!! compat "Julia 1.8"
1414+
The `const` keyword for fields of mutable structs requires at least Julia 1.8.
1415+
1416+
See the manual section on [Composite Types](@ref) for more information.
14011417
"""
14021418
kw"mutable struct"
14031419

@@ -1747,7 +1763,8 @@ The task will run in the "world age" from the parent at construction when [`sche
17471763
!!! warning
17481764
By default tasks will have the sticky bit set to true `t.sticky`. This models the
17491765
historic default for [`@async`](@ref). Sticky tasks can only be run on the worker thread
1750-
they are first scheduled on. To obtain the behavior of [`Threads.@spawn`](@ref) set the sticky
1766+
they are first scheduled on, and when scheduled will make the task that they were scheduled
1767+
from sticky. To obtain the behavior of [`Threads.@spawn`](@ref) set the sticky
17511768
bit manually to `false`.
17521769
17531770
# Examples

base/expr.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,9 @@ while it can not infer the concrete return type of it.
795795
Without the `@nospecializeinfer`, `f([1.0])` would infer the return type of `g` as `Float64`,
796796
indicating that inference ran for `g(::Vector{Float64})` despite the prohibition on
797797
specialized code generation.
798+
799+
!!! compat "Julia 1.10"
800+
Using `Base.@nospecializeinfer` requires Julia version 1.10.
798801
"""
799802
macro nospecializeinfer(ex)
800803
esc(isa(ex, Expr) ? pushmeta!(ex, :nospecializeinfer) : ex)

base/loading.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3005,7 +3005,13 @@ end
30053005
return stale_cachefile(PkgId(""), UInt128(0), modpath, cachefile; ignore_loaded)
30063006
end
30073007
@constprop :none function stale_cachefile(modkey::PkgId, build_id::UInt128, modpath::String, cachefile::String; ignore_loaded::Bool = false)
3008-
io = open(cachefile, "r")
3008+
io = try
3009+
open(cachefile, "r")
3010+
catch ex
3011+
ex isa IOError || ex isa SystemError || rethrow()
3012+
@debug "Rejecting cache file $cachefile for $modkey because it could not be opened" isfile(cachefile)
3013+
return true
3014+
end
30093015
try
30103016
checksum = isvalid_cache_header(io)
30113017
if iszero(checksum)

base/multidimensional.jl

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,25 +1025,34 @@ end
10251025

10261026
### from abstractarray.jl
10271027

1028-
# In the common case where we have two views into the same parent, aliasing checks
1029-
# are _much_ easier and more important to get right
1030-
function mightalias(A::SubArray{T,<:Any,P}, B::SubArray{T,<:Any,P}) where {T,P}
1031-
if !_parentsmatch(A.parent, B.parent)
1032-
# We cannot do any better than the usual dataids check
1033-
return !_isdisjoint(dataids(A), dataids(B))
1034-
end
1035-
# Now we know that A.parent === B.parent. This means that the indices of A
1036-
# and B are the same length and indexing into the same dimensions. We can
1037-
# just walk through them and check for overlaps: O(ndims(A)). We must finally
1038-
# ensure that the indices don't alias with either parent
1039-
return _indicesmightoverlap(A.indices, B.indices) ||
1040-
!_isdisjoint(dataids(A.parent), _splatmap(dataids, B.indices)) ||
1041-
!_isdisjoint(dataids(B.parent), _splatmap(dataids, A.indices))
1028+
function mightalias(A::SubArray, B::SubArray)
1029+
# There are three ways that SubArrays might _problematically_ alias one another:
1030+
# 1. The parents are the same we can conservatively check if the indices might overlap OR
1031+
# 2. The parents alias eachother in a more complicated manner (and we can't trace indices) OR
1032+
# 3. One's parent is used in the other's indices
1033+
# Note that it's ok for just the indices to alias each other as those should not be mutated,
1034+
# so we can always do better than the default !_isdisjoint(dataids(A), dataids(B))
1035+
if isbits(A.parent) || isbits(B.parent)
1036+
return false # Quick out for immutables
1037+
elseif _parentsmatch(A.parent, B.parent)
1038+
# Each SubArray unaliases its own parent from its own indices upon construction, so if
1039+
# the two parents are the same, then by construction one cannot alias the other's indices
1040+
# and therefore this is the only test we need to perform:
1041+
return _indicesmightoverlap(A.indices, B.indices)
1042+
else
1043+
A_parent_ids = dataids(A.parent)
1044+
B_parent_ids = dataids(B.parent)
1045+
return !_isdisjoint(A_parent_ids, B_parent_ids) ||
1046+
!_isdisjoint(A_parent_ids, _splatmap(dataids, B.indices)) ||
1047+
!_isdisjoint(B_parent_ids, _splatmap(dataids, A.indices))
1048+
end
10421049
end
1050+
# Test if two arrays are backed by exactly the same memory in exactly the same order
10431051
_parentsmatch(A::AbstractArray, B::AbstractArray) = A === B
1044-
# Two reshape(::Array)s of the same size aren't `===` because they have different headers
1045-
_parentsmatch(A::Array, B::Array) = pointer(A) == pointer(B) && size(A) == size(B)
1052+
_parentsmatch(A::DenseArray, B::DenseArray) = elsize(A) == elsize(B) && pointer(A) == pointer(B) && size(A) == size(B)
1053+
_parentsmatch(A::StridedArray, B::StridedArray) = elsize(A) == elsize(B) && pointer(A) == pointer(B) && strides(A) == strides(B)
10461054

1055+
# Given two SubArrays with the same parent, check if the indices might overlap (returning true if unsure)
10471056
_indicesmightoverlap(A::Tuple{}, B::Tuple{}) = true
10481057
_indicesmightoverlap(A::Tuple{}, B::Tuple) = error("malformed subarray")
10491058
_indicesmightoverlap(A::Tuple, B::Tuple{}) = error("malformed subarray")

base/reinterpretarray.jl

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ struct ReinterpretArray{T,N,S,A<:AbstractArray{S},IsReshaped} <: AbstractArray{T
1313

1414
function throwbits(S::Type, T::Type, U::Type)
1515
@noinline
16-
throw(ArgumentError("cannot reinterpret `$(S)` as `$(T)`, type `$(U)` is not a bits type"))
16+
throw(ArgumentError(LazyString("cannot reinterpret `", S, "` as `", T, "`, type `", U, "` is not a bits type")))
1717
end
1818
function throwsize0(S::Type, T::Type, msg)
1919
@noinline
20-
throw(ArgumentError("cannot reinterpret a zero-dimensional `$(S)` array to `$(T)` which is of a $msg size"))
20+
throw(ArgumentError(LazyString("cannot reinterpret a zero-dimensional `", S, "` array to `", T,
21+
"` which is of a ", msg, " size")))
2122
end
2223
function throwsingleton(S::Type, T::Type)
2324
@noinline
24-
throw(ArgumentError("cannot reinterpret a `$(S)` array to `$(T)` which is a singleton type"))
25+
throw(ArgumentError(LazyString("cannot reinterpret a `", S, "` array to `", T, "` which is a singleton type")))
2526
end
2627

2728
global reinterpret
@@ -50,14 +51,14 @@ struct ReinterpretArray{T,N,S,A<:AbstractArray{S},IsReshaped} <: AbstractArray{T
5051
function reinterpret(::Type{T}, a::A) where {T,N,S,A<:AbstractArray{S, N}}
5152
function thrownonint(S::Type, T::Type, dim)
5253
@noinline
53-
throw(ArgumentError("""
54-
cannot reinterpret an `$(S)` array to `$(T)` whose first dimension has size `$(dim)`.
55-
The resulting array would have non-integral first dimension.
56-
"""))
54+
throw(ArgumentError(LazyString(
55+
"cannot reinterpret an `", S, "` array to `", T, "` whose first dimension has size `", dim,
56+
"`. The resulting array would have a non-integral first dimension.")))
5757
end
5858
function throwaxes1(S::Type, T::Type, ax1)
5959
@noinline
60-
throw(ArgumentError("cannot reinterpret a `$(S)` array to `$(T)` when the first axis is $ax1. Try reshaping first."))
60+
throw(ArgumentError(LazyString("cannot reinterpret a `", S, "` array to `", T,
61+
"` when the first axis is ", ax1, ". Try reshaping first.")))
6162
end
6263
isbitstype(T) || throwbits(S, T, T)
6364
isbitstype(S) || throwbits(S, T, S)
@@ -82,15 +83,19 @@ struct ReinterpretArray{T,N,S,A<:AbstractArray{S},IsReshaped} <: AbstractArray{T
8283
function reinterpret(::typeof(reshape), ::Type{T}, a::A) where {T,S,A<:AbstractArray{S}}
8384
function throwintmult(S::Type, T::Type)
8485
@noinline
85-
throw(ArgumentError("`reinterpret(reshape, T, a)` requires that one of `sizeof(T)` (got $(sizeof(T))) and `sizeof(eltype(a))` (got $(sizeof(S))) be an integer multiple of the other"))
86+
throw(ArgumentError(LazyString("`reinterpret(reshape, T, a)` requires that one of `sizeof(T)` (got ",
87+
sizeof(T), ") and `sizeof(eltype(a))` (got ", sizeof(S), ") be an integer multiple of the other")))
8688
end
8789
function throwsize1(a::AbstractArray, T::Type)
8890
@noinline
89-
throw(ArgumentError("`reinterpret(reshape, $T, a)` where `eltype(a)` is $(eltype(a)) requires that `axes(a, 1)` (got $(axes(a, 1))) be equal to 1:$(sizeof(T) ÷ sizeof(eltype(a))) (from the ratio of element sizes)"))
91+
throw(ArgumentError(LazyString("`reinterpret(reshape, ", T, ", a)` where `eltype(a)` is ", eltype(a),
92+
" requires that `axes(a, 1)` (got ", axes(a, 1), ") be equal to 1:",
93+
sizeof(T) ÷ sizeof(eltype(a)), " (from the ratio of element sizes)")))
9094
end
9195
function throwfromsingleton(S, T)
9296
@noinline
93-
throw(ArgumentError("`reinterpret(reshape, $T, a)` where `eltype(a)` is $S requires that $T be a singleton type, since $S is one"))
97+
throw(ArgumentError(LazyString("`reinterpret(reshape, ", T, ", a)` where `eltype(a)` is ", S,
98+
" requires that ", T, " be a singleton type, since ", S, " is one")))
9499
end
95100
isbitstype(T) || throwbits(S, T, T)
96101
isbitstype(S) || throwbits(S, T, S)
@@ -804,8 +809,8 @@ end
804809
inpackedsize = packedsize(In)
805810
outpackedsize = packedsize(Out)
806811
inpackedsize == outpackedsize ||
807-
throw(ArgumentError("Packed sizes of types $Out and $In do not match; got $outpackedsize \
808-
and $inpackedsize, respectively."))
812+
throw(ArgumentError(LazyString("Packed sizes of types ", Out, " and ", In,
813+
" do not match; got ", outpackedsize, " and ", inpackedsize, ", respectively.")))
809814
in = Ref{In}(x)
810815
out = Ref{Out}()
811816
if struct_subpadding(Out, In)

base/task.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,13 @@ end
113113
Wrap an expression in a [`Task`](@ref) without executing it, and return the [`Task`](@ref). This only
114114
creates a task, and does not run it.
115115
116+
!!! warning
117+
By default tasks will have the sticky bit set to true `t.sticky`. This models the
118+
historic default for [`@async`](@ref). Sticky tasks can only be run on the worker thread
119+
they are first scheduled on, and when scheduled will make the task that they were scheduled
120+
from sticky. To obtain the behavior of [`Threads.@spawn`](@ref) set the sticky
121+
bit manually to `false`.
122+
116123
# Examples
117124
```jldoctest
118125
julia> a1() = sum(i for i in 1:1000);
@@ -826,6 +833,13 @@ the woken task.
826833
It is incorrect to use `schedule` on an arbitrary `Task` that has already been started.
827834
See [the API reference](@ref low-level-schedule-wait) for more information.
828835
836+
!!! warning
837+
By default tasks will have the sticky bit set to true `t.sticky`. This models the
838+
historic default for [`@async`](@ref). Sticky tasks can only be run on the worker thread
839+
they are first scheduled on, and when scheduled will make the task that they were scheduled
840+
from sticky. To obtain the behavior of [`Threads.@spawn`](@ref) set the sticky
841+
bit manually to `false`.
842+
829843
# Examples
830844
```jldoctest
831845
julia> a5() = sum(i for i in 1:1000);

cli/trampolines/trampolines_aarch64.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
#define XX(name) \
77
.global CNAME(name) SEP \
8+
CNAME(name)##: SEP \
89
.cfi_startproc SEP \
910
.p2align 2 SEP \
10-
CNAME(name)##: SEP \
1111
adrp x16, PAGE(CNAME(name##_addr)) SEP \
1212
ldr x16, [x16, PAGEOFF(CNAME(name##_addr))] SEP \
1313
br x16 SEP \

deps/blastrampoline.version

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
BLASTRAMPOLINE_JLL_NAME := libblastrampoline
33

44
## source build
5-
BLASTRAMPOLINE_VER := 5.8.0
6-
BLASTRAMPOLINE_BRANCH=v5.8.0
7-
BLASTRAMPOLINE_SHA1=81316155d4838392e8462a92bcac3eebe9acd0c7
5+
BLASTRAMPOLINE_VER := 5.11.0
6+
BLASTRAMPOLINE_BRANCH=v5.11.0
7+
BLASTRAMPOLINE_SHA1=05083d50611b5538df69706f0a952d8e642b0b4b
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0a9d28868d4ed82d053a586d398ed0ed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
8c8bc23cfe2b181cfe37a715057e03dc3d8c811e0480586c6e557a2d9e3fb0f1fef93eef4abc94354e6436ac837bcee8414a5c988a00cba5fe822da9aafcd45f

deps/checksums/Pkg-f487626b090b91493828cbcde30eed96fb9f8e8f.tar.gz/md5

Lines changed: 0 additions & 1 deletion
This file was deleted.

deps/checksums/Pkg-f487626b090b91493828cbcde30eed96fb9f8e8f.tar.gz/sha512

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)