-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Backports release 1.11 #57714
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.11 #57714
Conversation
Improve performance of `^(::Float64, n::Integer)` in the case of `abs(n) > 2^13`. While `pow_body` is unreliable for `abs(n) > 2^25` this implementation provides errors of a few ULPs, while runtime is capped to that of the `Float64` implementation. Fixes #53881 See also #53886. (cherry picked from commit fe49d56)
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 <[email protected]> (cherry picked from commit 29da86b)
Otherwise error when calling `print_inline_table` (cherry picked from commit f207224)
…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 <[email protected]> (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 c9008ff, with typo fix to typed_loaded memcpy which was already deleted from master)
…eless inferred code" (#57864) This reverts commit bdf8219, from #56749 **Note that this PR is made against `backports-release-1.11`.** Rationale: when coverage is on, both the native code and the inferred code might be eliminated, a complete loss of all precompilation results. There are intentions to adopt a new strategy for Julia 1.12, but in the meantime we should revert this change since it is "just" a sysimg size reduction. Affected Julia versions: 1.11.3, 1.11.4 xref timholy/SnoopCompile.jl#413 (comment)
59ec75e
to
56909d7
Compare
The list of commits to backports here (and also in the 1.12 backport PR) is missing #57493. Even though this is shown as closed, it has been merged to master as e2cc68c. (In the PR thread is a small discussion about the github weirdness happening around this.) cc @thofma |
) (cherry picked from commit e2cc68c)
@IanButterworth https://buildkite.com/julialang/julia-release-1-dot-11/builds/427#0195d770-9aa9-453f-a32f-02ef2ab4b528/1550-1551 the PCRE finalizer is giving errors |
My bad, but can we make finalizers throw during julia CI? |
…n `reinterpret` (#57732)
Fixes #57141. Given the function ```julia julia> function _f() ref = Ref{Any}() ref[] = 3 @Assert isdefined(ref, :x) inner = Returns(ref) x = inner() (x, ref[]) end _f (generic function with 1 method) julia> f() = first(_f()) f (generic function with 1 method) ``` Here is before: ```julia julia> @code_typed f() CodeInfo( 1 ─ %1 = %new(Base.RefValue{Any})::Base.RefValue{Any} └── goto #3 2 ─ unreachable 3 ─ return %1 ) => Base.RefValue{Any} ``` Here is after this PR: ```julia julia> @code_typed f() CodeInfo( 1 ─ %1 = %new(Base.RefValue{Any})::Base.RefValue{Any} │ builtin Base.setfield!(%1, :x, 3)::Int64 │ %3 = builtin Main.isdefined(%1, :x)::Bool └── goto #3 if not %3 2 ─ goto #4 3 ─ %6 = invoke Base.AssertionError("isdefined(ref, :x)"::String)::AssertionError │ builtin Base.throw(%6)::Union{} └── unreachable 4 ─ return %1 ) => Base.RefValue{Any} ``` The elimination of `setfield!` was due to a use still being recorded for `ref[]` in the def-use data while DCE eliminated this `getindex` call (by virtue of not using the second tuple element in the result). --------- Co-authored-by: Cédric Belmant <[email protected]> Co-authored-by: Shuhei Kadowaki <[email protected]> (cherry picked from commit fea26dd)
Make this function `--trim` compatible. (cherry picked from commit 8edc2b3)
Co-authored-by: Jishnu Bhattacharya <[email protected]> (cherry picked from commit 3e57a8a)
5c74dc0
to
618c74e
Compare
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.
75bf576
to
ee1e525
Compare
When SSL_CERT_FILE or SSL_CERT_DIR is set, it is [impossible to set this location](https://github.com/libgit2/libgit2/blob/4dcdb64c6844d76776745cdc25071a72c1af84d6/src/libgit2/settings.c#L206-L222) in LibGit2_jll on Apple and Windows because [it isn't built with support for that](https://github.com/JuliaPackaging/Yggdrasil/blob/7123a60a68102ba6cd953e13a4e45845dc37fd82/L/LibGit2/build_tarballs.jl#L67). Until now we've errored out with a message telling users to set JULIA_SSL_CA_ROOTS_PATH to an empty string, which is a somewhat problematic workaround because the Windows environment variables UI doesn't allow empty values, and [setting it to an empty string from PowerShell unsets it](https://discourse.julialang.org/t/how-to-fix-ssl-cert-issues-in-pkg/115495/7?u=visr). This PR changes the behavior to allow this expected error. Variables like SSL_CERT_FILE are for instance [set by the Conda OpenSSL package on environment activation](https://github.com/conda-forge/openssl-feedstock/blob/83b5e2a793bc95d19e6cc2d9d28068f1a6ff6b79/recipe/activate-win.ps1) used by e.g. Python, ensuring many people cannot use Pkg operations that use LibGit2, like `dev Example`, `add Example#master`. See more user reports [on Discourse](https://discourse.julialang.org/search?q=JULIA_SSL_CA_ROOTS_PATH). Together with JuliaLang/NetworkOptions.jl#37 this should improve the experience of users trying out Julia from a Conda environment. This should also be fine to backport. (cherry picked from commit 7fa969a)
Makes the sysimage more resistant to method invalidation, when defining a new `Integer` subtype with a right bitshift method. (cherry picked from commit 69a22cf)
Without this change `prevpow` and `nextpow` fail for, e.g., `BigInt`; incorrectly throwing a `MethodError`. For example, calls like `prevpow(3, big"10")` or `nextpow(3, big"10")` fail. The issue is that the code incorrectly assumes the existence of a `typemax` method. Another issue was a missing promote for the arguments of a `mul_with_overflow` call. Fixes #57906 (cherry picked from commit 3627a85)
@KristofferC If possible, please bump Pkg to include JuliaLang/Pkg.jl#4140 (related to JuliaLang/Pkg.jl#4141) - should fix #56458. |
lld 17 and above by default error if symbols listed in the version script are undefined. Julia has a few of these, as some symbols are defined conditionally in Julia (e.g. based on OS), others perhaps have been removed from Julia and other seem to be defined in other libraries. Further the version script is used in linking three times, each time linking together different objects and so having different symbols defined. Adding `-Wl,--undefined-version` is not a great solution as passing that to ld < 2.40 errors and there doesn't seem to be a great way to check if a linker supports this flag. I don't know how to get around these errors for symbols like `_IO_stdin_used` which Julia doesn't define and it seems to matter whether or not they are exported, see https://libc-alpha.sourceware.narkive.com/SevIQmU3/io-stdin-used-stripped-by-version-scripts. So I've converted all undefined symbols into wildcards to work around the error. Fixes #50414, fixes #54533 and replaces #55319. --------- Co-authored-by: Zentrik <[email protected]> (cherry picked from commit d269d7d)
This reverts commit c28dc85.
@nanosoldier |
7d79a8b
to
99a18f6
Compare
The package evaluation job you requested has completed - possible new issues were detected. Report summary❗ Packages that crashed3 packages crashed only on the current version.
22 packages crashed on the previous version too. ✖ Packages that failed50 packages failed only on the current version.
2861 packages failed on the previous version too. ✔ Packages that passed tests36 packages passed tests only on the current version.
6204 packages passed tests on the previous version too. ➖ Packages that were skipped altogether2 packages were skipped only on the current version.
1299 packages were skipped on the previous version too. |
@nanosoldier |
The package evaluation job you requested has completed - possible new issues were detected. Report summary❗ Packages that crashed1 packages crashed only on the current version.
✖ Packages that failed15 packages failed only on the current version.
5 packages failed on the previous version too. ✔ Packages that passed tests1 packages passed tests only on the current version.
26 packages passed tests on the previous version too. |
Pluto stuff is fonsp/Pluto.jl#3178 Not sure about:
|
seems to fail on 32-bit linux, sigh. |
Co-authored-by: Mosè Giordano <[email protected]>
This reverts commit 237ad1a.
Backported PRs:
dirname.c
from MINGW #56413Base.summarysize
forMemory
withUnion
#57508circshift!(::AbstractVector, ::Integer)
#57539Base.Precompilation.ExplicitEnv
: handle type instability better in constructor #57599nextind
,prevind
methods #57608printvalue
#57584Base
:append!
,resize!
: convert length toInt
before passing it on #57585string(::LazyLibraryPath)
#57721::Real
fallback stack overflow #57790String
#57781Int
to prevent invalidation #57848mod
for mixes ofSigned
andUnsigned
#57853Base
:PCRE
:exec
: type assertString
after construction #57868Base
:macro b_str
: restrict argument toString
#57863Base
:macro cmd
: restrict argument toString
#57862Random
:show
method forMersenneTwister
: invalidation resistance #57913Base
: shell escaping: inference improvement to prevent invalidation #57915_precompilepkgs
: interactive progress display: fix unintended capture #57932Need manual backport:
Pairs
public #56794macro
methods for pre-compilation #57833Contains multiple commits, manual intervention needed:
String(::Memory)
copy #54457using Foo: Foo, ...
in package code (was: "using considered harmful") #42080struct
to hard #56755AnnotatedString
: add concrete type asserts toisvalid
,ncodeunits
#57607type_in_worklist
query #57917Non-merged PRs with backport label:
oftype
#57951append_c_digits
: typeassertInt
to improve inference #57950@nospecialize
macros #57782@nospecialize
forstring_index_err
#57604displaysize
to theIOContext
used by the REPL #55499isfile_casesensitive
fixes on Windows #55220@inbounds
andBase.@propagate_inbounds
#50157nextpow
,prevpow
for types withouttypemax
#49669