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.11 #55936

Merged
merged 15 commits into from
Oct 1, 2024
Merged

Backports release 1.11 #55936

merged 15 commits into from
Oct 1, 2024

Commits on Sep 30, 2024

  1. Mmap: fix grow! for non file IOs (#55849)

    Fixes #54203
    Requires #55641
    
    Based on
    #55641 (comment)
    cc. @JakeZw @ronisbr
    
    ---------
    
    Co-authored-by: Jameson Nash <[email protected]>
    (cherry picked from commit b0db75d)
    IanButterworth authored and KristofferC committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    050ecea View commit details
    Browse the repository at this point in the history
  2. Update TaskLocalRNG docstring according to #49110 (#55863)

    Since #49110, which is included in 1.10 and 1.11, spawning a task no
    longer advances the parent task's RNG state, so this statement in the
    docs was incorrect.
    
    (cherry picked from commit c601b11)
    danielwe authored and KristofferC committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    5f46099 View commit details
    Browse the repository at this point in the history
  3. Root globals in toplevel exprs (#54433)

    This fixes #54422, the code here assumes that top level exprs are always
    rooted, but I don't see that referenced anywhere else, or guaranteed, so
    conservatively always root objects that show up in code.
    
    (cherry picked from commit 6e5e87b)
    gbaraldi authored and KristofferC committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    7c2f533 View commit details
    Browse the repository at this point in the history
  4. Fix some corner cases of isapprox with unsigned integers (#55828)

    (cherry picked from commit e4b29f7)
    giordano authored and KristofferC committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    969d816 View commit details
    Browse the repository at this point in the history
  5. Profile: fix order of fields in heapsnapshot & improve formatting (#5…

    …5890)
    
    (cherry picked from commit 32b9e1a)
    IanButterworth authored and KristofferC committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    eb8845f View commit details
    Browse the repository at this point in the history
  6. inference: add missing TypeVar handling for instanceof_tfunc (#55884

    )
    
    I thought these sort of problems had been addressed by d60f92c, but it
    seems some were missed. Specifically, `t.a` and `t.b` from `t::Union`
    could be `TypeVar`, and if they are passed to a subroutine or recursed
    without being unwrapped or rewrapped, errors like #55882
    could occur.
    
    This commit resolves the issue by calling `unwraptv` in the `Union`
    handling within `instanceof_tfunc`. I also found a similar issue inside
    `nfields_tfunc`, so that has also been fixed, and test cases have been
    added. While I haven't been able to make up a test case specifically for
    the fix in `instanceof_tfunc`, I have confirmed that this commit
    certainly fixes the issue reported in #55882.
    
    - fixes #55882
    
    (cherry picked from commit 4b27a16)
    aviatesk authored and KristofferC committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    4f26286 View commit details
    Browse the repository at this point in the history
  7. Install terminfo data under /usr/share/julia (#55881)

    Just like all other libraries, we don't want internal Julia files to
    mess with system files.
    
    Introduced by #55411.
    
    (cherry picked from commit 0dbb6eb)
    nalimilan authored and KristofferC committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    73d43af View commit details
    Browse the repository at this point in the history
  8. do not intentionally suppress errors in precompile script from being …

    …reported or failing the result (#55909)
    
    I was slightly annoying that the build was set up to succeed if this
    step failed, so I removed the error suppression and fixed up the script
    slightly
    
    (cherry picked from commit 4a4ca9c)
    vtjnash authored and KristofferC committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    b3181b8 View commit details
    Browse the repository at this point in the history
  9. fix rawbigints OOB issues (#55917)

    Fixes issues introduced in #50691 and found in #55906:
    * use `@inbounds` and `@boundscheck` macros in rawbigints, for catching
    OOB with `--check-bounds=yes`
    * fix OOB in `truncate`
    
    (cherry picked from commit 17445fe)
    nsajko authored and KristofferC committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    a4c3a19 View commit details
    Browse the repository at this point in the history
  10. bump Pkg to latest 1.11

    KristofferC committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    2b28354 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    108bd2e View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2024

  1. TOML: Avoid type-pirating Base.TOML.Parser (#55892)

    Since stdlibs can be duplicated but Base never is, `Base.require_stdlib`
    makes type piracy even more complicated than it normally would be.
    
    To adapt, this changes `TOML.Parser` to be a type defined by the TOML
    stdlib, so that we can define methods on it without committing
    type-piracy and avoid problems like Pkg.jl#4017
    
    Resolves
    JuliaLang/Pkg.jl#4017 (comment)
    
    (cherry picked from commit 2a2878c)
    topolarity authored and KristofferC committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    d5e8e1f View commit details
    Browse the repository at this point in the history
  2. relocation: account for trailing path separator in depot paths (#55355)

    Fixes #55340
    
    (cherry picked from commit a7c5056)
    fatteneder authored and KristofferC committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    23b7de6 View commit details
    Browse the repository at this point in the history
  3. Limit @inbounds to indexing in the dual-iterator branch in `copyto_…

    …unaliased!` (#55919)
    
    This simplifies the `copyto_unalised!` implementation where the source
    and destination have different `IndexStyle`s, and limits the `@inbounds`
    to only the indexing operation. In particular, the iteration over
    `eachindex(dest)` is not marked as `@inbounds` anymore. This seems to
    help with performance when the destination uses Cartesian indexing.
    Reduced implementation of the branch:
    ```julia
    function copyto_proposed!(dest, src)
        axes(dest) == axes(src) || throw(ArgumentError("incompatible sizes"))
        iterdest, itersrc = eachindex(dest), eachindex(src)
        for (destind, srcind) in zip(iterdest, itersrc)
            @inbounds dest[destind] = src[srcind]
        end
        dest
    end
    
    function copyto_current!(dest, src)
        axes(dest) == axes(src) || throw(ArgumentError("incompatible sizes"))
        iterdest, itersrc = eachindex(dest), eachindex(src)
        ret = iterate(iterdest)
        @inbounds for a in src
            idx, state = ret::NTuple{2,Any}
            dest[idx] = a
            ret = iterate(iterdest, state)
        end
        dest
    end
    
    function copyto_current_limitinbounds!(dest, src)
        axes(dest) == axes(src) || throw(ArgumentError("incompatible sizes"))
        iterdest, itersrc = eachindex(dest), eachindex(src)
        ret = iterate(iterdest)
        for isrc in itersrc
            idx, state = ret::NTuple{2,Any}
            @inbounds dest[idx] = src[isrc]
            ret = iterate(iterdest, state)
        end
        dest
    end
    ```
    ```julia
    julia> a = zeros(40000,4000); b = rand(size(a)...);
    
    julia> av = view(a, UnitRange.(axes(a))...);
    
    julia> @Btime copyto_current!($av, $b);
      617.704 ms (0 allocations: 0 bytes)
    
    julia> @Btime copyto_current_limitinbounds!($av, $b);
      304.146 ms (0 allocations: 0 bytes)
    
    julia> @Btime copyto_proposed!($av, $b);
      240.217 ms (0 allocations: 0 bytes)
    
    julia> versioninfo()
    Julia Version 1.12.0-DEV.1260
    Commit 4a4ca9c (2024-09-28 01:49 UTC)
    Build Info:
      Official https://julialang.org release
    Platform Info:
      OS: Linux (x86_64-linux-gnu)
      CPU: 8 × Intel(R) Core(TM) i5-10310U CPU @ 1.70GHz
      WORD_SIZE: 64
      LLVM: libLLVM-18.1.7 (ORCJIT, skylake)
    Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)
    Environment:
      JULIA_EDITOR = subl
    ```
    I'm not quite certain why the proposed implementation here
    (`copyto_proposed!`) is even faster than
    `copyto_current_limitinbounds!`. In any case, `copyto_proposed!` is
    easier to read, so I'm not complaining.
    
    This fixes #53158
    
    (cherry picked from commit 06e7b9d)
    jishnub authored and KristofferC committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    9cb1ea6 View commit details
    Browse the repository at this point in the history
  4. bump Pkg to latest v1.11

    KristofferC committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    cb5cd2a View commit details
    Browse the repository at this point in the history