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 #51563

Merged
merged 46 commits into from
Nov 2, 2023
Merged

Backports release 1.10 #51563

merged 46 commits into from
Nov 2, 2023

Commits on Oct 3, 2023

  1. Use rr-safe nopl; rdtsc sequence (#50975)

    When running under `rr`, it needs to patch out `rdtsc` to record the
    values returned. If this is not possible, `rr` falls back to an
    expensive signal-based emulation. As of rr master, a specific `nopl;
    rdtsc` sequence may be used to guarantee that `rdtsc` patching is always
    possible. Use this sequence for uses of rdtsc in our runtime.
    
    (cherry picked from commit ce3f97c)
    Keno authored and KristofferC committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    9c4cedc View commit details
    Browse the repository at this point in the history
  2. Avoid infinite loop when doing SIGTRAP in arm64-apple (#51284)

    The guard instruction for unreachables and other crashes in aarch64 is
    `brk`, in macos there isn't a distinction between a brk for a breakpoint
    and one for a crash, as an attempt we check the value of `pc` when the
    signal is triggered, if it is
    `brk #0x1` we say that it is a crash and go into the sigdie_handler.
    
    We should probably do the same in aarch64 linux, though I haven't dug
    too deep into what values it uses for traps, and if what compiler used
    matters, on apple I assumed we use clang/LLVM
    
    It might be possible to test this by calling some inline assembly.
    
    This means that something like
    #51267 actually crashes with
    ```c
    [16908] signal (5): Trace/BPT trap: 5
    in expression starting at /Users/gabrielbaraldi/julia/test.jl:2
    _collect at ./array.jl:768
    collect at ./array.jl:757
    top-level scope at /Users/gabrielbaraldi/julia/test.jl:5
    _jl_invoke at /Users/gabrielbaraldi/julia/src/gf.c:2892
    jl_toplevel_eval_flex at /Users/gabrielbaraldi/julia/src/toplevel.c:925
    jl_toplevel_eval_flex at /Users/gabrielbaraldi/julia/src/toplevel.c:877
    ijl_toplevel_eval at /Users/gabrielbaraldi/julia/src/toplevel.c:943 [inlined]
    ijl_toplevel_eval_in at /Users/gabrielbaraldi/julia/src/toplevel.c:985
    eval at ./boot.jl:383 [inlined]
    include_string at ./loading.jl:2070
    _jl_invoke at /Users/gabrielbaraldi/julia/src/gf.c:2873
    ijl_apply_generic at /Users/gabrielbaraldi/julia/src/gf.c:3074
    _include at ./loading.jl:2130
    include at ./Base.jl:494
    jfptr_include_46486 at /Users/gabrielbaraldi/julia/usr/lib/julia/sys.dylib (unknown line)
    _jl_invoke at /Users/gabrielbaraldi/julia/src/gf.c:2873
    ijl_apply_generic at /Users/gabrielbaraldi/julia/src/gf.c:3074
    exec_options at ./client.jl:317
    _start at ./client.jl:552
    jfptr__start_83179 at /Users/gabrielbaraldi/julia/usr/lib/julia/sys.dylib (unknown line)
    _jl_invoke at /Users/gabrielbaraldi/julia/src/gf.c:2873
    ijl_apply_generic at /Users/gabrielbaraldi/julia/src/gf.c:3074
    jl_apply at /Users/gabrielbaraldi/julia/src/./julia.h:1970 [inlined]
    true_main at /Users/gabrielbaraldi/julia/src/jlapi.c:582
    jl_repl_entrypoint at /Users/gabrielbaraldi/julia/src/jlapi.c:731
    Allocations: 570978 (Pool: 570031; Big: 947); GC: 1
    fish: Job 1, './julia test.jl' terminated by signal SIGTRAP (Trace or breakpoint trap)
    ```
    instead of hanging silently
    
    ---------
    
    Co-authored-by: Jameson Nash <vtjnash@gmail.com>
    (cherry picked from commit d51ad06)
    gbaraldi authored and KristofferC committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    b248b6b View commit details
    Browse the repository at this point in the history
  3. [Random] Add s4 field to Xoshiro type (#51332)

    This PR adds an optional field to the existing `Xoshiro` struct to be
    able to faithfully copy the task-local RNG state.
    
    Fixes #51255
    Redo of #51271
    
    Background context: #49110 added an additional state to the task-local
    RNG. However, before this PR `copy(default_rng())` did not include this
    extra state, causing subtle errors in `Test` where `copy(default_rng())`
    is assumed to contain the full task-local RNG state.
    
    (cherry picked from commit 41b41ab)
    nhz2 authored and KristofferC committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    4f6a4f4 View commit details
    Browse the repository at this point in the history
  4. call Pkg precompile hook in latest world (#51397)

    Fixes #51280.
    
    (cherry picked from commit c22adc0)
    KristofferC authored and KristofferC committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    0c39aef View commit details
    Browse the repository at this point in the history
  5. Remove fallback that assigns a module to inlined frames. (#51405)

    The work I did in #41099 introduced code which, if method information
    could not be found for an inlined frame, would fall back to use the
    module of the next-higher stack frame. This often worked there because
    the only frames that would not be assigned a module at this point would
    be e.g., `macro expansion` frames.
    
    However, due to the performance impact of the way method roots are
    currently encoded, the extra method roots were removed in #50546.
    
    The result is that inlined frames were being assigned a potentially
    incorrect module, rather than being left blank.
    
    Example:
    ```
    julia> @Btime plot([1 2 3], seriestype = :blah)
    ...
     [13] #invokelatest#2
        @ BenchmarkTools ./essentials.jl:901 [inlined]
     [14] invokelatest
        @ BenchmarkTools ./essentials.jl:896 [inlined]
    ...
    ```
    
    (cherry picked from commit ed891d6)
    BioTurboNick authored and KristofferC committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    77b74c3 View commit details
    Browse the repository at this point in the history
  6. Throw clearer ArgumentError for strip with two string args (#51491)

    (cherry picked from commit 66fe51f)
    IanButterworth authored and KristofferC committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    765c1af View commit details
    Browse the repository at this point in the history
  7. fix _tryonce_download_from_cache (busybox.exe download error) (#51531)

    (cherry picked from commit ca862df)
    IanButterworth authored and KristofferC committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    4dc08dc View commit details
    Browse the repository at this point in the history
  8. Fix string index error in tab completion code, fixes #51540 (#51541)

    (cherry picked from commit 6ce15fc)
    jakobnissen authored and KristofferC committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    0e9addd View commit details
    Browse the repository at this point in the history
  9. Don't mark nonlocal symbols as hidden (#51530)

    Co-authored-by: Valentin Churavy <vchuravy@users.noreply.github.com>
    (cherry picked from commit ac8246f)
    pchintalapudi authored and KristofferC committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    e1f1cc8 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    37a1b6f View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2023

  1. Fix last startup & shutdown precompiles (#51557)

    (cherry picked from commit f2d1276)
    IanButterworth committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    510550b View commit details
    Browse the repository at this point in the history
  2. complete false & true more generally as vals (#51326)

    (cherry picked from commit e85f0a5)
    IanButterworth committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    8cb3197 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ddec9e4 View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2023

  1. avoid limiting Type{Any} to Type (#51512)

    Fix #51510
    
    (cherry picked from commit 25f510a)
    vtjnash authored and KristofferC committed Oct 9, 2023
    Configuration menu
    Copy the full SHA
    674f440 View commit details
    Browse the repository at this point in the history
  2. reset maxprobe on empty! (#51595)

    As pointed out in
    #51594 (comment),
    this is necessary for the assertion added in
    #49447 to be valid.
    
    Fix #51594
    
    (cherry picked from commit c18e485)
    oscardssmith authored and KristofferC committed Oct 9, 2023
    Configuration menu
    Copy the full SHA
    1e95bf8 View commit details
    Browse the repository at this point in the history
  3. Aggressive constprop in LinearAlgebra.wrap (#51582)

    This helps with type-stability, as the flag `tA` is usually known from
    the type of the matrix.
    On master,
    ```julia
    julia> f(A) = LinearAlgebra.wrap(A, 'N')
    f (generic function with 1 method)
    
    julia> @code_typed f([1;;])
    CodeInfo(
    1 ─ %1 = invoke LinearAlgebra.wrap(A::Matrix{Int64}, 'N'::Char)::Union{Adjoint{Int64, Matrix{Int64}}, Hermitian{Int64, Matrix{Int64}}, Symmetric{Int64, Matrix{Int64}}, Transpose{Int64, Matrix{Int64}}, Matrix{Int64}}
    └──      return %1
    ) => Union{Adjoint{Int64, Matrix{Int64}}, Hermitian{Int64, Matrix{Int64}}, Symmetric{Int64, Matrix{Int64}}, Transpose{Int64, Matrix{Int64}}, Matrix{Int64}}
    ```
    This PR
    ```julia
    julia> @code_typed f([1;;])
    CodeInfo(
    1 ─     return A
    ) => Matrix{Int64}
    ```
    
    (cherry picked from commit 0fd7f72)
    jishnub authored and KristofferC committed Oct 9, 2023
    Configuration menu
    Copy the full SHA
    8c387e3 View commit details
    Browse the repository at this point in the history
  4. correctly track element pointer in heap snapshot (#51592)

    Fixes #51576 on a simple
    snapshot I collected on my machine.
    
    (cherry picked from commit 5bdc1b3)
    d-netto authored and KristofferC committed Oct 9, 2023
    Configuration menu
    Copy the full SHA
    b3898c3 View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2023

  1. fix annotations on sym_in (#51573)

    This seems to be the right combination of annotations to fix both #50562
    and an inference regression in PropertyDicts.jl on the 1.10 release
    branch. When backported the `@noinline` should be restored for 1.10.
    
    (cherry picked from commit f7e8f92)
    JeffBezanson authored and KristofferC committed Oct 10, 2023
    Configuration menu
    Copy the full SHA
    2523d15 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2023

  1. Configuration menu
    Copy the full SHA
    b01e7e5 View commit details
    Browse the repository at this point in the history
  2. [LibCURL_jll] Upgrade to v8.4.0 (#51667)

    (cherry picked from commit abf5d9e)
    KristofferC authored and KristofferC committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    d117058 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2023

  1. Handle infix operators in REPL completion (#51366)

    Fix #51194
    
    This PR fixes a regression introduced in
    #49294, so I believe it should be
    backported to v1.10.
    In the current code, completion of `qux(foo, bar.` is detected by
    parsing `foo(qux, bar` as an incomplete expression, and then looking for
    the sub-expression to complete (here, `bar.`). This approach fails
    however for infix calls, since completing `foo + bar.` starts by parsing
    `foo + bar`, which is a complete call expression, and so the code
    behaves as if completing `(foo + bar).` instead of `bar.`. This leads to
    the current problematic behaviour:
    ```julia
    julia> Complex(1, 3) + (4//5).#TAB
    im
    re
    ```
    which would be correct for `(Complex(1, 3) + (4//5)).#TAB`, but here we
    expect
    ```julia
    julia> Complex(1, 3) + (4//5).#TAB
    den
    num
    ```
    
    This PR fixes that by trying to detect infix calls. In the long term,
    all this ad-hoc and probably somewhat wrong string processing should be
    replaced by proper use of `JuliaSyntax` (as mentioned in
    #49294 (comment),
    #50817 (comment)
    and probably other places), but for now at least this fixes the
    regression.
    
    (cherry picked from commit e949236)
    Liozou authored and KristofferC committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    110e9ba View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2023

  1. Upgrade SuiteSparse to 7.2.1

    ViralBShah authored and KristofferC committed Oct 20, 2023
    1 Configuration menu
    Copy the full SHA
    d4809e5 View commit details
    Browse the repository at this point in the history
  2. Test for reverting back to 1.8 GC heuristics (#51661)

    The 1.10 GC heuristics introduced in
    #50144 have been a source of
    concerning issues such as
    #50705 and
    #51601. The PR also doesn't
    correctly implement the paper on which it's based, as discussed in
    #51498.
    
    Test whether the 1.8 GC heuristics are a viable option.
    d-netto committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    3b97715 View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2023

  1. bump SparseArrays to latest release-1.10

    KristofferC committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    f2c447d View commit details
    Browse the repository at this point in the history
  2. Handle AbstractQ in concatenation (#51132)

    Handling `AbstractQ`s in concatenation got lost in the overhaul. This
    brings it back (though it seemed to not be used anywhere), and even
    better: pre-1.9 `Q`s where handled via `AbstractMatrix` fallbacks, so
    elementwise. Now, it first materializes the matrix, and then copies to
    the right place in the destination array.
    
    (cherry picked from commit 50146b2)
    dkarrasch authored and KristofferC committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    4d3022e View commit details
    Browse the repository at this point in the history
  3. Allow tab after key name in TOML.parse (#51622)

    Fixes JuliaLang/TOML.jl#52
    
    (cherry picked from commit 8180240)
    jaakkor2 authored and KristofferC committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    78b7a21 View commit details
    Browse the repository at this point in the history
  4. Allow using ReturnNode() in @generated code (#51715)

    IRTools.jl currently tries to use `ReturnNode()` to model unreachable
    block terminators but it fails in `find_ssavalue_uses`. This PR adds a
    check to enable using `ReturnNode()` in untyped code.
    
    One other alternative for frontends is to use an instruction known to
    terminate (`Core.throw`) instead. See
    FluxML/IRTools.jl#115 for more context.
    
    (cherry picked from commit ff03e51)
    Pangoraw authored and KristofferC committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    5f8f33b View commit details
    Browse the repository at this point in the history
  5. Lower Pidfile stale_age multiplier. Add pidfile to cache log message. (

    …#51714)
    
    (cherry picked from commit 6ec149f)
    IanButterworth authored and KristofferC committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    516725d View commit details
    Browse the repository at this point in the history
  6. codegen: fix gc rooting bug (#51744)

    ccall was not creating roots for the contents of struct values which
    contained roots on the stack, as expected to align with `GC.@preserve`,
    and causing many segfaults for #51319
    
    (cherry picked from commit e36f65f)
    vtjnash authored and KristofferC committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    8329725 View commit details
    Browse the repository at this point in the history
  7. limit TimeType subtraction (#51743)

    Disallow some type combinations that don't make sense.
    
    ---------
    
    Co-authored-by: Ben Baumgold <4933671+baumgold@users.noreply.github.com>
    (cherry picked from commit 8a889ff)
    JeffBezanson authored and KristofferC committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    c426095 View commit details
    Browse the repository at this point in the history
  8. fix unicode indexing in parse(Complex, string) (#51758)

    This fixes a string-indexing bug introduced in #24713 (Julia 0.7).
    Sometimes, this would cause `parse(Complex{T}, string)` to throw a
    `StringIndexError` rather than an `ArgumentError`, e.g. for
    `parse(ComplexF64, "3 β+ 4im")` or `parse(ComplexF64, "3 + 4αm")`. (As
    far as I can tell, it can never cause parsing to fail for valid
    strings.)
    
    The source of the error is that if `i` is the index of an ASCII
    character in a string `s`, then `s[i+1]` is valid (even if the next
    character is non-ASCII) but `s[i-1]` is invalid if the previous
    character is non-ASCII.
    
    (cherry picked from commit f71228d)
    stevengj authored and KristofferC committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    bd99491 View commit details
    Browse the repository at this point in the history
  9. Don't make pkgimages global editable (#51781)

    (cherry picked from commit 37611b4)
    gbaraldi authored and KristofferC committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    d2a66d8 View commit details
    Browse the repository at this point in the history
  10. Revert "bump SparseArrays to latest release-1.10"

    This reverts commit f2c447d.
    KristofferC committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    e862940 View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2023

  1. bump SparseArrays to latest release-1.10

    KristofferC committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    5ded9ab View commit details
    Browse the repository at this point in the history
  2. Fix typo in range display (#51832)

    Thanks ScottPJones for finding this.
    
    Co-authored-by: Lilith Hafner <Lilith.Hafner@gmail.com>
    (cherry picked from commit b197197)
    LilithHafner authored and KristofferC committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    be97eb7 View commit details
    Browse the repository at this point in the history
  3. Make local scope for else blocks in try/catch/else (#51785)

    [Docs](https://docs.julialang.org/en/v1/manual/control-flow/#else-Clauses)
    state:
    
    > The try, catch, else, and finally clauses each introduce their own
    > scope blocks.
    
    But it is currently not the case for `else` blocks
    
    ```julia
    julia> try
           catch
           else
               z = 1
           end
    1
    
    julia> z
    1
    ```
    
    This change actually makes `else` blocks have their own scope block:
    
    ```julia
    julia> try
           catch
           else
               z = 1
           end
    1
    
    julia> z
    ERROR: UndefVarError: `z` not defined
    ```
    
    (cherry picked from commit 17a36ee)
    Pangoraw authored and KristofferC committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    7ae1535 View commit details
    Browse the repository at this point in the history
  4. fix eltype for partition iterators of substrings (#51773)

    Fixes #51771
    
    The convert method that asserts in #51771 is arguably still faulty
    though.
    
    (cherry picked from commit cf00550)
    KristofferC authored and KristofferC committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    4e1759c View commit details
    Browse the repository at this point in the history
  5. [release 1.10] trigger a full sweep if beyond max total memory (#51843)

    Otherwise `--heap-size-hint` will become a no-op.
    
    Likely a merge bug from #51661.
    d-netto committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    a599ed4 View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2023

  1. inference: fix infinite recursion of nested Generators (#51845)

    It seems this case has already been fixed by other improvements, so we
    no longer need this hack, which is now causing problems.
    
    Fixes #51694
    vtjnash authored and aviatesk committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    ac2593a View commit details
    Browse the repository at this point in the history
  2. LLVM: Activate typed pointers through the API instead of a global opt…

    …ion. (#51840)
    
    This allows other users of LLVM to use opaque pointers with their
    contexts.
    
    Co-authored-by: Jameson Nash <vtjnash@gmail.com>
    maleadt and vtjnash committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    f3e683d View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2023

  1. fixup to #51743, timetype subtraction

    Restores the method whose removal was probably causing problems.
    
    (cherry picked from commit 14d9c7c)
    JeffBezanson committed Oct 26, 2023
    Configuration menu
    Copy the full SHA
    1977e1f View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2023

  1. Backport LLVM 15.0.7-9 to 1.10 (#51882)

    Backport of #51863
    vchuravy committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    1fe4e26 View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2023

  1. Backport "Fix Expr(:loopinfo) codegen" (#51883)

    Backport #50663 to 1.10
    vchuravy committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    cba88c1 View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2023

  1. fixup to #51743, timetype subtraction

    Restores the method whose removal was probably causing problems.
    
    (cherry picked from commit f6f1ee9)
    JeffBezanson authored and KristofferC committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    0edde83 View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2023

  1. remove chmodding the pkgimages (#51885)

    This shouldn't be needed because `ldd` should do it itself.
    
    (cherry picked from commit 5b34cdf)
    KristofferC authored and KristofferC committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    4770eea View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    81d8c12 View commit details
    Browse the repository at this point in the history