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 for 1.10.6 #55746

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

Backports for 1.10.6 #55746

wants to merge 7 commits into from

Conversation

KristofferC
Copy link
Sponsor Member

Backported PRs:

Need manual backport:

Contains multiple commits, manual intervention needed:

Non-merged PRs with backport label:

mbauman and others added 7 commits September 12, 2024 10:54
More finely scope the `@inbounds` annotations to ensure neither `f` nor
`op` are erroneously `@inbounds`ed.

(cherry picked from commit 1dffd77)
Some methods were filtered out based simply on visit order, which was
not intentional, with the lim==-1 weak-edges mode.

Fix #55231

(cherry picked from commit 1db5cf7)
Currently, "API reference" is at the same level as "Dates" although it
is a subsection of it. This looks particularly weird in the PDF version
of the manual: Section 67 is "Dates" and Section 68 is "API reference".

Note that I didn't change the nesting level of the subsection
"Constants" at the end of the file. As a result, it is now at the same
level as "Dates and Time Types" and "Dates Functions". Before it was a
subsection of the latter, which appears wrong to me.

(cherry picked from commit 881be64)
fixes #55266, and use `inv(z)`
rather than `1/z` and use `muladd` in a couple places.

---------

Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
(cherry picked from commit b7aa5e3)
This brings the docstring closer to the actual implementation. In
particular, following the current docstring and defining
```julia
symmetric(::MyMatrix, uplo=:U)
```
leads to a method ambiguity, as `LinearAlgebra` defines
`symmetric(::AbstractMatrix, uplo::Symbol=:U)`.

(cherry picked from commit 8a19b74)
This sets all `.jl` files in `$(prefix)/base` and `$(prefix)/test` to
have `0444` permissions, to better match how `Pkg` installs packages
(and sets them to be read-only).

Fixes JuliaLang/juliaup#865

---------

Co-authored-by: Mosè Giordano <765740+giordano@users.noreply.github.com>
(cherry picked from commit 62e7705)
Let's change `jl_array_to_string` so that we make the consequences of
calling it in a thread-unsafe way less disastrous (i.e. let's avoid
corrupting GC internal metrics).

Strictly speaking, this is not a bug-fix because calling
`jl_array_to_string` concurrently from two threads is UB in any case.

To see how a race here may lead to negative `live_bytes`, consider this
MWE from @NHDaly:

- 1.10:
```Julia
julia> GC.gc(true); Base.gc_live_bytes()
1842370

julia> g_vecs = Any[
                  UInt8['a' for _ in 1:1000000000]
                  for _ in 1:10
                  ];

julia> GC.gc(true); Base.gc_live_bytes()
10001774906

julia> Threads.@threads for _ in 1:1000
                  for v in g_vecs
                      String(v)
                  end
              end

julia> GC.gc(true); Base.gc_live_bytes()
-1997600207
```

- This patch:
```Julia
julia> GC.gc(true); Base.gc_live_bytes()
1862440

julia> g_vecs = Any[
                  UInt8['a' for _ in 1:1000000000]
                  for _ in 1:10
                  ];

julia> GC.gc(true); Base.gc_live_bytes()
10001796440

julia> Threads.@threads for _ in 1:1000
                  for v in g_vecs
                      String(v)
                  end
              end

julia> GC.gc(true); Base.gc_live_bytes()
10002390952
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants