Skip to content

Backports for 1.10.10 #57715

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

Open
wants to merge 24 commits into
base: release-1.10
Choose a base branch
from
Open

Backports for 1.10.10 #57715

wants to merge 24 commits into from

Conversation

KristofferC
Copy link
Member

@KristofferC KristofferC commented Mar 11, 2025

Backported PRs:

Need manual backport:

Contains multiple commits, manual intervention needed:

Non-merged PRs with backport label:

inkydragon and others added 3 commits March 11, 2025 10:47
- `dirname.c` was removed by
c2cec7a

(cherry picked from commit 85dc2c7)
Other backends (in this case NVPTX) require that `invariant.load`
metadata is maintained to generate non-coherent loads.

Currently, we unconditionally strip that metadata from all loads,
since our other uses of it may have become invalid.

x-ref: llvm/llvm-project#112834
JuliaGPU/CUDA.jl#2531

---------

Co-authored-by: Gabriel Baraldi <baraldigabriel@gmail.com>
(cherry picked from commit 29da86b)
@KristofferC KristofferC added the release Release management and versioning. label Mar 11, 2025
@IanButterworth IanButterworth deleted the backports-release-1.10 branch March 27, 2025 22:37
@DilumAluthge
Copy link
Member

Hmmm. Was it intentional that this PR was closed?

@IanButterworth IanButterworth restored the backports-release-1.10 branch March 27, 2025 22:55
@IanButterworth
Copy link
Member

Ugh.. sorry, the github desktop app has a bug where it deletes upstream branches rather than the origin branch when you instruct it to do that.

nsajko and others added 18 commits March 31, 2025 21:29
)

The type assertions are valid according to the doc strings of these
functions in the case of `AbstractString`.

Should prevent some invalidation on loading user code.

Fixes #57605

(cherry picked from commit 6c9c336)
…on (#57476)

Typevars are all existential (in the sense of variable lb/ub) during
intersection. This fix is somehow costly as we have to perform 3 times
check to prove a false result. But a single existential <: seems too
dangerous as it cause many circular env in the past.
fix #57429
fix #41561

(cherry picked from commit beb928b)
…lignment to LLVM (#56938)

Fixes #56937

---------

Co-authored-by: Oscar Smith <oscardssmith@gmail.com>
(cherry picked from commit 1e2758e)
The alignment of a nested object (in C layouts) is not affected by the
alignment of its parent container when computing a field offset (as if
it will be allocated at address 0). This can be strongly
counter-intuitive (as it implies it should add padding where it does not
seem to provide value to the user), but this is required to match the C
standard. It also permits users to write custom allocators which happen
to provide alignment in excess of that which codegen may assume is
guaranteed, and get the behavioral characteristics they intended to
specify (without resorting to computing explicit padding).

Addresses
#57713 (comment)

(Cherry-picked from ec3c02a in
v1.11 backports branch)
This was resulting in it being too aggressive at filtering out
"duplicate" results, resulting in possible inference mistakes or missing
guardsig entries.

Fixes:
#50722 (comment)
(cherry picked from commit 762801c)
Co-authored-by: Jishnu Bhattacharya <jishnub.github@gmail.com>
(cherry picked from commit 3e57a8a)
When getting stacktraces on non-X86 platforms, the first frame may not
have been set up yet, incorrectly triggering this bad-frame detection
logic. This should fix the issue of async unwind failing after only
getting 2 frames, if the first frame happens to land in the function
header. This is not normally an issue on X86 or non-signals, but also
causes no expected issues to be the same logic there too.

Fix #52334

After (on arm64-apple-darwin24.3.0):
```
julia> f(1)
Warning: detected a stack overflow; program state may be corrupted, so further execution might be unreliable.
ERROR: StackOverflowError:
Stacktrace:
     [1] f(x::Int64)
       @ Main ./REPL[3]:1
     [2] g(x::Int64)
       @ Main ./REPL[4]:1
--- the above 2 lines are repeated 39990 more times ---
 [79983] f(x::Int64)
       @ Main ./REPL[3]:1
```

n.b. This will not fix and is not related to any issues where profiling
gets only a single stack frame during profiling of syscalls on Apple
AArch64. This fix is specific to the bug where it gets exactly 2 frames.

(cherry picked from commit f82917a)
Restricts the dispatch for these macros so that only `String` (literal)
arguments are accepted:
* `int128_str`
* `uint128_str`
* `big_str`
* `ip_str` from the Sockets stdlib
* `dateformat_str` from the Dates stdlib

Some of these changes make the code in the sysimage less vulnerable to
invalidation.

(cherry picked from commit f9365a5)
Previously this was just overfowing producing wrong answers (both for
the sign convention and just the wrong modulo class)
fixes #57851

(cherry picked from commit 0568917)
Should make the sysimage less vulnerable to invalidation.

As far as I understand this change can't break any code, because:
* the macro definition requires `AbstractString`
* the way Julia macros work, the argument is either a literal or an
`Expr`
* `String` is the only `AbstractString` with literals

(cherry picked from commit 87f4d3a)
Should make the sysimage less vulnerable to invalidation.

As far as I understand this change can't break any code, because:
* the macro definition requires `AbstractString`
* the way Julia macros work, the argument is either a literal or an
`Expr`
* `String` is the only `AbstractString` with literals

(cherry picked from commit 7acb2a6)
#57913)

Avoid using or constructing the vector with nonconcrete element type.

Should make the sysimage more resistant to method invalidation.

(cherry picked from commit 8e03cb1)
This fixes building on FreeBSD AArch64, as there was a regression in
OpenLibm 0.8.4; see JuliaMath/openlibm#314.

(cherry picked from commit 3c7bc45)
@KristofferC KristofferC force-pushed the backports-release-1.10 branch from ea29f10 to 269369c Compare March 31, 2025 19:29
@topolarity topolarity force-pushed the backports-release-1.10 branch from fab480d to 269369c Compare April 1, 2025 16:13
topolarity and others added 2 commits April 1, 2025 12:45
When pre-compiling `stdlib/` this cache has a 91% hit rate, so this
seems fairly profitable. It also dramatically improves some pathological
cases, a few of which have been hit in the wild (arguably due to
inference bugs)

Without this PR, this package takes exponentially long to pre-compile:
```julia
function BigType(N)
    (N == 0) && return Nothing
    T = BigType(N-1)
    return Pair{T,T}
end
foo(::Type{T}) where T = T
precompile(foo, (Type{BigType(40)},))
```

For an in-the-wild test case hit by a customer, this reduces
pre-compilation time from over an hour to just ~two and a half minutes.

Resolves #53331.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release Release management and versioning.
Projects
None yet
Development

Successfully merging this pull request may close these issues.