Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Backports release 1.10.5 #54851

Merged
merged 52 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
7c22da6
Allow libquadmath to also fail as it is not available on all systems …
ViralBShah May 30, 2024
3f35094
Fix trampoline assembly for build on clang 18 on apple silicon (#54634)
gbaraldi May 30, 2024
e52719b
Aggressive constprop in trevc! to stabilize triangular eigvec (#54635)
jishnub May 31, 2024
236d2ce
ensure we set the right value to gc_first_tid (#54645)
d-netto May 31, 2024
936673b
Add boundscheck in bindingkey_eq to avoid OOB access due to data race…
gbaraldi Jun 5, 2024
51e2229
make: Fix `sed` command for LLVM libraries with no symbol versioning …
topolarity Jun 5, 2024
9fac394
LazyString in reinterpretarray error messages (#54704)
jishnub Jun 7, 2024
005fd2f
make: use `readelf` for LLVM symbol version detection (#54713)
topolarity Jun 10, 2024
fb977a2
[LinearAlgebra] Improve resilience to unknown libblastrampoline flags…
staticfloat Jun 13, 2024
82aa263
add sticky task warning to `@task` and `schedule` (#54815)
IanButterworth Jun 18, 2024
48e140b
Do not add type tag size to the `alloc_typed` lowering for GC allocat…
gbaraldi Jun 18, 2024
9af34c4
🤖 [backports-release-1.10] Bump the Pkg stdlib from f487626b0 to 6d73…
DilumAluthgeBot Jul 13, 2024
396ef27
LinearAlgebra: use `≈` instead of `==` for `tr` tests in symmetric.jl…
aviatesk Jul 17, 2024
ddf7090
`LazyString` in `LinearAlgebra.checksquare` error message (#53961)
jishnub Apr 5, 2024
4499295
Remove boxing in pinv (#51351)
Zentrik Sep 18, 2023
6c58b41
Profile: Improve module docstring (#52678)
IanButterworth Jan 2, 2024
bfa01f9
Fix generic triangular solves with empty matrices (#54201)
dkarrasch Apr 23, 2024
4b0f303
Update the aarch64 devdocs to reflect the current state of its suppor…
gbaraldi Jul 16, 2024
9ca08e9
Compat for `Base.@nospecializeinfer` (#55178)
mikmoore Jul 20, 2024
21d33b4
compat notice for a[begin] indexing (#55197)
stevengj Jul 21, 2024
6225d9a
correction to compat notice for a[begin] (#55209)
stevengj Jul 22, 2024
43cdc58
document mutable struct const fields (#55203)
IanButterworth Jul 23, 2024
4b063cf
more precise aliasing checks for SubArray (#54624)
mbauman Jun 5, 2024
6ee9546
Fix assertion/crash when optimizing function with dead basic block (#…
gbaraldi Jun 6, 2024
8b72c09
Use triple quotes in TOML.print when string contains newline (#55084)
palday Jul 9, 2024
9591961
LinearAlgebra: LazyString in error messages for Diagonal/Bidiagonal (…
jishnub Jul 10, 2024
c7bf7b8
add missing compat entry to edit (#54769)
palday Jun 12, 2024
dbb0640
Bump libblastrampoline to v5.10.1 (#54791)
staticfloat Jun 14, 2024
c632ee6
bump Pkg to latest v1.10
KristofferC Jul 24, 2024
884c71e
Disable typed pointer tests for alloc-opt-pass since the base file is…
gbaraldi Jul 24, 2024
b8c84fd
Remove reference to memory attribute in llvm pass
gbaraldi Jul 26, 2024
6cd6f8d
relax equality in trace test
KristofferC Jul 26, 2024
71b0b31
Fix calling LLVM_SIZE on windows (#53902)
Zentrik Apr 1, 2024
23fb255
fixup some casts in uv code, extraced from commit e5496e0
KristofferC Aug 1, 2024
6dc961c
Do not hide libssp.dll.a (Windows import library) in private library …
mkitti Jan 14, 2024
b5d12a5
Remove the WarnMissedTransformations pass from the 1.10 pipeline (#55…
vchuravy Aug 5, 2024
1de44ab
Add openlibm to sysimg link line on windows (#53672)
Keno Jun 18, 2024
b1fee19
🤖 [backports-release-1.10] Bump the Pkg stdlib from bf83c387b to ff18…
DilumAluthgeBot Aug 5, 2024
0be37db
[build] Some improvements to the LLVM build system (#55354)
giordano Aug 6, 2024
1b641c9
AllocOpt: Fix stack lowering where alloca continas boxed and unboxed …
wsmoses Aug 7, 2024
f91f502
[docs] change docstring to match code (#55013)
araujoms Jul 25, 2024
980b83d
Fix a bug in `stack`'s DimensionMismatch error message (#54033)
mcabbott Jul 25, 2024
f705611
Add `lbt_forwarded_funcs()` to debug LBT forwarding issues (#55302)
staticfloat Jul 30, 2024
2eef480
Restrict argument to `isleapyear(::Integer)` (#55317)
jariji Jul 31, 2024
82dc2d6
Profile: Fix stdlib paths (#55327)
IanButterworth Aug 1, 2024
a28e527
[libblastrampoline] Bump to v5.11.0 (#55330)
staticfloat Aug 1, 2024
67ac373
Fix tr for block SymTridiagonal (#55371)
jishnub Aug 5, 2024
fd6d9e0
bump Pkg to latest 1.10
Aug 8, 2024
3a4ccaa
`stale_cachefile`: handle if the expected cache file is missing (#55419)
IanButterworth Aug 9, 2024
b4b1646
🤖 [backports-release-1.10] Bump the Pkg stdlib from 9cb6d35f8 to 4552…
DilumAluthgeBot Aug 9, 2024
746ea6a
🤖 [backports-release-1.10] Bump the Pkg stdlib from 45521a6e8 to a4f2…
DilumAluthgeBot Aug 11, 2024
5b677f9
bump Pkg to latest 1.10
Aug 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ win-extras:
ifeq ($(USE_SYSTEM_LLVM), 1)
LLVM_SIZE := llvm-size$(EXE)
else
LLVM_SIZE := $(build_depsbindir)/llvm-size$(EXE)
LLVM_SIZE := PATH=$(build_bindir):$$PATH; $(build_depsbindir)/llvm-size$(EXE)
endif
build-stats:
ifeq ($(USE_BINARYBUILDER_LLVM),1)
Expand Down
4 changes: 2 additions & 2 deletions base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,12 @@ endif
ifneq (,$(LIBGFORTRAN_VERSION))
$(eval $(call symlink_system_library,CSL,libgfortran,$(LIBGFORTRAN_VERSION)))
endif
$(eval $(call symlink_system_library,CSL,libquadmath,0))
$(eval $(call symlink_system_library,CSL,libstdc++,6))
# We allow libssp, libatomic and libgomp to fail as they are not available on all systems
# We allow libssp, libatomic, libgomp and libquadmath to fail as they are not available on all systems
$(eval $(call symlink_system_library,CSL,libssp,0,ALLOW_FAILURE))
$(eval $(call symlink_system_library,CSL,libatomic,1,ALLOW_FAILURE))
$(eval $(call symlink_system_library,CSL,libgomp,1,ALLOW_FAILURE))
$(eval $(call symlink_system_library,CSL,libquadmath,0,ALLOW_FAILURE))
$(eval $(call symlink_system_library,PCRE,libpcre2-8))
$(eval $(call symlink_system_library,DSFMT,libdSFMT))
$(eval $(call symlink_system_library,LIBBLASTRAMPOLINE,libblastrampoline))
Expand Down
2 changes: 1 addition & 1 deletion base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2891,7 +2891,7 @@ end
@inline function _stack_size_check(x, ax1::Tuple)
if _iterator_axes(x) != ax1
uax1 = map(UnitRange, ax1)
uaxN = map(UnitRange, axes(x))
uaxN = map(UnitRange, _iterator_axes(x))
throw(DimensionMismatch(
LazyString("stack expects uniform slices, got axes(x) == ", uaxN, " while first had ", uax1)))
end
Expand Down
25 changes: 21 additions & 4 deletions base/docs/basedocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,11 @@ Usually `begin` will not be necessary, since keywords such as [`function`](@ref)
implicitly begin blocks of code. See also [`;`](@ref).

`begin` may also be used when indexing to represent the first index of a
collection or the first index of a dimension of an array.
collection or the first index of a dimension of an array. For example,
`a[begin]` is the first element of an array `a`.

!!! compat "Julia 1.4"
Use of `begin` as an index requires Julia 1.4 or later.

# Examples
```jldoctest
Expand Down Expand Up @@ -1396,8 +1400,20 @@ kw"struct"
mutable struct

`mutable struct` is similar to [`struct`](@ref), but additionally allows the
fields of the type to be set after construction. See the manual section on
[Composite Types](@ref) for more information.
fields of the type to be set after construction.

Individual fields of a mutable struct can be marked as `const` to make them immutable:

```julia
mutable struct Baz
a::Int
const b::Float64
end
```
!!! compat "Julia 1.8"
The `const` keyword for fields of mutable structs requires at least Julia 1.8.

See the manual section on [Composite Types](@ref) for more information.
"""
kw"mutable struct"

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

# Examples
Expand Down
3 changes: 3 additions & 0 deletions base/expr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,9 @@ while it can not infer the concrete return type of it.
Without the `@nospecializeinfer`, `f([1.0])` would infer the return type of `g` as `Float64`,
indicating that inference ran for `g(::Vector{Float64})` despite the prohibition on
specialized code generation.

!!! compat "Julia 1.10"
Using `Base.@nospecializeinfer` requires Julia version 1.10.
"""
macro nospecializeinfer(ex)
esc(isa(ex, Expr) ? pushmeta!(ex, :nospecializeinfer) : ex)
Expand Down
8 changes: 7 additions & 1 deletion base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3005,7 +3005,13 @@ end
return stale_cachefile(PkgId(""), UInt128(0), modpath, cachefile; ignore_loaded)
end
@constprop :none function stale_cachefile(modkey::PkgId, build_id::UInt128, modpath::String, cachefile::String; ignore_loaded::Bool = false)
io = open(cachefile, "r")
io = try
open(cachefile, "r")
catch ex
ex isa IOError || ex isa SystemError || rethrow()
@debug "Rejecting cache file $cachefile for $modkey because it could not be opened" isfile(cachefile)
return true
end
try
checksum = isvalid_cache_header(io)
if iszero(checksum)
Expand Down
41 changes: 25 additions & 16 deletions base/multidimensional.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1025,25 +1025,34 @@ end

### from abstractarray.jl

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

# Given two SubArrays with the same parent, check if the indices might overlap (returning true if unsure)
_indicesmightoverlap(A::Tuple{}, B::Tuple{}) = true
_indicesmightoverlap(A::Tuple{}, B::Tuple) = error("malformed subarray")
_indicesmightoverlap(A::Tuple, B::Tuple{}) = error("malformed subarray")
Expand Down
31 changes: 18 additions & 13 deletions base/reinterpretarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@ struct ReinterpretArray{T,N,S,A<:AbstractArray{S},IsReshaped} <: AbstractArray{T

function throwbits(S::Type, T::Type, U::Type)
@noinline
throw(ArgumentError("cannot reinterpret `$(S)` as `$(T)`, type `$(U)` is not a bits type"))
throw(ArgumentError(LazyString("cannot reinterpret `", S, "` as `", T, "`, type `", U, "` is not a bits type")))
end
function throwsize0(S::Type, T::Type, msg)
@noinline
throw(ArgumentError("cannot reinterpret a zero-dimensional `$(S)` array to `$(T)` which is of a $msg size"))
throw(ArgumentError(LazyString("cannot reinterpret a zero-dimensional `", S, "` array to `", T,
"` which is of a ", msg, " size")))
end
function throwsingleton(S::Type, T::Type)
@noinline
throw(ArgumentError("cannot reinterpret a `$(S)` array to `$(T)` which is a singleton type"))
throw(ArgumentError(LazyString("cannot reinterpret a `", S, "` array to `", T, "` which is a singleton type")))
end

global reinterpret
Expand Down Expand Up @@ -50,14 +51,14 @@ struct ReinterpretArray{T,N,S,A<:AbstractArray{S},IsReshaped} <: AbstractArray{T
function reinterpret(::Type{T}, a::A) where {T,N,S,A<:AbstractArray{S, N}}
function thrownonint(S::Type, T::Type, dim)
@noinline
throw(ArgumentError("""
cannot reinterpret an `$(S)` array to `$(T)` whose first dimension has size `$(dim)`.
The resulting array would have non-integral first dimension.
"""))
throw(ArgumentError(LazyString(
"cannot reinterpret an `", S, "` array to `", T, "` whose first dimension has size `", dim,
"`. The resulting array would have a non-integral first dimension.")))
end
function throwaxes1(S::Type, T::Type, ax1)
@noinline
throw(ArgumentError("cannot reinterpret a `$(S)` array to `$(T)` when the first axis is $ax1. Try reshaping first."))
throw(ArgumentError(LazyString("cannot reinterpret a `", S, "` array to `", T,
"` when the first axis is ", ax1, ". Try reshaping first.")))
end
isbitstype(T) || throwbits(S, T, T)
isbitstype(S) || throwbits(S, T, S)
Expand All @@ -82,15 +83,19 @@ struct ReinterpretArray{T,N,S,A<:AbstractArray{S},IsReshaped} <: AbstractArray{T
function reinterpret(::typeof(reshape), ::Type{T}, a::A) where {T,S,A<:AbstractArray{S}}
function throwintmult(S::Type, T::Type)
@noinline
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"))
throw(ArgumentError(LazyString("`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")))
end
function throwsize1(a::AbstractArray, T::Type)
@noinline
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)"))
throw(ArgumentError(LazyString("`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)")))
end
function throwfromsingleton(S, T)
@noinline
throw(ArgumentError("`reinterpret(reshape, $T, a)` where `eltype(a)` is $S requires that $T be a singleton type, since $S is one"))
throw(ArgumentError(LazyString("`reinterpret(reshape, ", T, ", a)` where `eltype(a)` is ", S,
" requires that ", T, " be a singleton type, since ", S, " is one")))
end
isbitstype(T) || throwbits(S, T, T)
isbitstype(S) || throwbits(S, T, S)
Expand Down Expand Up @@ -804,8 +809,8 @@ end
inpackedsize = packedsize(In)
outpackedsize = packedsize(Out)
inpackedsize == outpackedsize ||
throw(ArgumentError("Packed sizes of types $Out and $In do not match; got $outpackedsize \
and $inpackedsize, respectively."))
throw(ArgumentError(LazyString("Packed sizes of types ", Out, " and ", In,
" do not match; got ", outpackedsize, " and ", inpackedsize, ", respectively.")))
in = Ref{In}(x)
out = Ref{Out}()
if struct_subpadding(Out, In)
Expand Down
14 changes: 14 additions & 0 deletions base/task.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ end
Wrap an expression in a [`Task`](@ref) without executing it, and return the [`Task`](@ref). This only
creates a task, and does not run it.

!!! warning
By default tasks will have the sticky bit set to true `t.sticky`. This models the
historic default for [`@async`](@ref). Sticky tasks can only be run on the worker thread
they are first scheduled on, and when scheduled will make the task that they were scheduled
from sticky. To obtain the behavior of [`Threads.@spawn`](@ref) set the sticky
bit manually to `false`.

# Examples
```jldoctest
julia> a1() = sum(i for i in 1:1000);
Expand Down Expand Up @@ -826,6 +833,13 @@ the woken task.
It is incorrect to use `schedule` on an arbitrary `Task` that has already been started.
See [the API reference](@ref low-level-schedule-wait) for more information.

!!! warning
By default tasks will have the sticky bit set to true `t.sticky`. This models the
historic default for [`@async`](@ref). Sticky tasks can only be run on the worker thread
they are first scheduled on, and when scheduled will make the task that they were scheduled
from sticky. To obtain the behavior of [`Threads.@spawn`](@ref) set the sticky
bit manually to `false`.

# Examples
```jldoctest
julia> a5() = sum(i for i in 1:1000);
Expand Down
2 changes: 1 addition & 1 deletion cli/trampolines/trampolines_aarch64.S
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

#define XX(name) \
.global CNAME(name) SEP \
CNAME(name)##: SEP \
.cfi_startproc SEP \
.p2align 2 SEP \
CNAME(name)##: SEP \
adrp x16, PAGE(CNAME(name##_addr)) SEP \
ldr x16, [x16, PAGEOFF(CNAME(name##_addr))] SEP \
br x16 SEP \
Expand Down
6 changes: 3 additions & 3 deletions deps/blastrampoline.version
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
BLASTRAMPOLINE_JLL_NAME := libblastrampoline

## source build
BLASTRAMPOLINE_VER := 5.8.0
BLASTRAMPOLINE_BRANCH=v5.8.0
BLASTRAMPOLINE_SHA1=81316155d4838392e8462a92bcac3eebe9acd0c7
BLASTRAMPOLINE_VER := 5.11.0
BLASTRAMPOLINE_BRANCH=v5.11.0
BLASTRAMPOLINE_SHA1=05083d50611b5538df69706f0a952d8e642b0b4b
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0a9d28868d4ed82d053a586d398ed0ed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8c8bc23cfe2b181cfe37a715057e03dc3d8c811e0480586c6e557a2d9e3fb0f1fef93eef4abc94354e6436ac837bcee8414a5c988a00cba5fe822da9aafcd45f

This file was deleted.

This file was deleted.

Loading