Skip to content

Conversation

@nathanrboyer
Copy link
Contributor

No description provided.

DilumAluthge and others added 30 commits July 6, 2023 12:36
Co-authored-by: Gabriel Baraldi <baraldigabriel@gmail.com>
(cherry picked from commit e025877)
…accurate with parallel marking (#50466)

(cherry picked from commit 8e877cb)
`Core._svec_ref` has accepted `boundscheck`-value as the first argument
since it was added in #45062. Nonetheless, `Core._svec_ref` simply calls
`jl_svec_ref` in either the interpreter or the codegen, and thus the
`boundscheck` value isn't utilized in any optimizations. Rather, even
worse, this `boundscheck`-argument negatively influences the effect
analysis (xref #50167 for details) and has caused type inference
regressions as reported in #50544.

For these reasons, this commit simply eliminates the `boundscheck`
argument from `Core._svec_ref`. Consequently,
`getindex(::SimpleVector, ::Int)` is now being concrete-eval eligible.

closes #50544
…current dir is unwritable (#50476)

Co-authored-by: Valentin Churavy <vchuravy@users.noreply.github.com>
(cherry picked from commit 0f6bfd6)
In the presence of `attach_after` insertions, we have to be careful to
extend the basic block to include everything up to the last insertion.
We were accounting for "new" nodes (before the compaction point), but
not "pending" nodes (after the compaction point).

Fixes #50379.

(cherry picked from commit cdec4c2)
Ensure `internal_obj_base_ptr` checks whether objects past freelist
pointer are in freelist.

Fixes #50434

(cherry picked from commit dcca46b)
Fixes #50451

(cherry picked from commit f4f1ecf)
We do not care about this condition (the point of this fast path is to
skip checking it).

Fix #50450

(cherry picked from commit 15bcf1b)
Fixes the case from #50518, but we actually have two test cases in
the tests that also hit this (e.g. this one:
```
f40964(xs::Int...=1; k = 2) = (xs, k)
```), but just happened not to hit the bad codegen path. #50556,
once merged would have complained on those definitions as well,
without this fix.

(cherry picked from commit c272236)
At present we only record direct `innervars` (`T` -> `S<:Val{T}`). And chained `innervars` might be ignored (`T` -> `S<:Val{V<:T}`\
This commit fix it.

(cherry picked from commit cd74337)
Fixes #50532. The `read(io, Char)` method didn't correctly handle the
case where the lead byte starts with too many leading ones; this fix
makes it handle that case correctly, which makes `read(io, Char)` match
`collect(s)` in its interpretation of what a character is in all invalid
cases. Also fix and test `read(::File, Char)` which has the same bug.

(cherry picked from commit ffe1a07)
* Use SparseArrays.jl updated to work with SuiteSparse 7, and with Int32 indices
* SuiteSparse_jll Update to v7.2.0 (Using @Wimmerer's SuiteSparse fork for 32-bit QR)

---------

Co-authored-by: Francois-Xavier Coudert <fxcoudert@gmail.com>
Co-authored-by: Will Kimmerer <kimmerer@mit.edu>
(cherry picked from commit b26f3b2)
This used to make a lot of references to design issues with the
SparseArrays package (#2326 /
#20815), which result in a
non-sensical dispatch arrangement, and contribute to a slow loading
experience do to the nonsense Unions that must be checked by subtyping.

(cherry picked from commit 5a922fa)
…wed (#50541)

Usually this is caught by use of `eval`, but we should try to move away
from that broad rule to specific functions such as this one, such that
eventually we can remove that rule from `eval`.

Fix #50538

(cherry picked from commit 3a9345c)
topolarity and others added 23 commits September 15, 2023 16:40
ELF doesn't handle WEAK symbols dynamically the way it handles them
statically.

Looking up overloaded WEAK symbols via a library-specific handle will
often give you the empty stub (in `libc.so.7` in this case) instead of
the strong implementation elsewhere (`ld-elf.so.1` here).

Even after the [upstream
fix](https://cgit.freebsd.org/src/commit/?id=21a52f99440c9bec7679f3b0c5c9d888901c3694),
`dlsym`, `dladdr` and a ton of other symbols still have stubs with no
trampoline in FreeBSD's libc:

https://cgit.freebsd.org/src/tree/lib/libc/gen/dlfcn.c?id=21a52f99440c9bec7679f3b0c5c9d888901c3694
Thankfully `dl_iterate_phdr` appears to be the only function that we
directly `ccall` from Julia's Libdl so we can leave this fix incomplete
for now.

Resolves #50846.

(cherry picked from commit c659011)
Resolves #50714

(cherry picked from commit 91b8c9b)
Inference seems to have trouble with the anonymous function version, so
go back to the recursive version.

Fixes #51129
Probably also fixes #50859

(cherry picked from commit d949bb4)
…51036)" (#51153)

Causes `matches` to get replaced with `MethodMatch` instead, which then
later will fail to match with the expected value.

Fixes #51146

Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
(cherry picked from commit da86735)
This can cause segfaults when exiting julia.

Co-authored-by: Valentin Churavy <vchuravy@users.noreply.github.com>
(cherry picked from commit b3741c0)
This is not a legal operation outside the lock because it's not atomic

Co-authored-by: Valentin Churavy <v.churavy@gmail.com>
(cherry picked from commit bbbcc4f)
Fixes #8286, which regressed
due to a GMP upgrade in #45375.

(cherry picked from commit 1097481)
We had the ordering of tests incorrect, so Vararg was not correctly
checked for validity during method definition.

Fixes #51228

(cherry picked from commit 34e6035)
This was getting current-task on the wrong thread, which resulted in the
value being NULL and crashing.

Fixes #50325

(cherry picked from commit 5090bc0)
Fix #50709

This issue *appears* fixed on master due to #50432, which simply removed
the error. This fixes the underlying cause, which is that we sometimes
return typevars in the environment from intersection that have free vars
in their bounds. I think it's reasonable to just widen these
aggressively, since we usually cannot do much with these kinds of
unknown static parameters anyway.

(cherry picked from commit a3e2316)
These test were taking on the order of 5 minutes and 10-100s of GB, but
they really did not need to.

(cherry picked from commit bab20f4)
…ey change it back when they're done (#51029)

We already check the following for mutation by a test set:
1. DEPOT_PATH
2. LOAD_PATH
3. ENV

So this PR just adds the active project to the list of things we check.

Changing the active project during a test set can definitely have
negative effects on subsequent test sets that are run on the same
worker, so we want to make sure if a test set changes the active
project, that they change it back when they're done.

(cherry picked from commit 106e867)
This backports `Fixes and improvements for source builds (#51422)` PR to
the `backports-release-1.10` branch to make it buildable without binary
builder (we are monitoring that branch in our CI to make sure we are up
to date with the upcoming 1.10 release).

Co-authored-by: Tim Besard <tim.besard@gmail.com>
… computed by `abstract_apply` (#51393)

This commit adds special handling for `Vararg` types that may appear at
the end of `argtypes`, as computed by `abstract_apply`. Even though PR

within the abstract state, they can still be part of `argtypes`. As a
result, this kind of special handling is still necessary. It remains an
open question whether we can refactor `abstract_apply` to prevent
`Vararg`s from appearing in `argtypes` in the first place.
Backported PRs:
- [x] #48625 <!-- add replace(io, str, patterns...) -->
- [x] #48387 <!-- Improve documentation of sort-related functions -->
- [x] #48363 <!-- Revise sort.md and docstrings in sort.jl -->
- [x] #48977 <!-- Update SparseArrays.jl stdlib for SuiteSparse 7 -->
- [x] #50719 <!-- fix `CyclePadding(::DataType)` -->
- [x] #50694 <!-- inference: permit recursive type traits -->
- [x] #50860 <!-- Add `Base.get_extension` to docs/API -->
- [x] #50594 <!-- Disallow non-index Integer types in isassigned -->
- [x] #50802 <!-- Makes IntrusiveLinkedListSynchronized mutable to avoid
allocation on poptask -->
- [x] #50858 <!-- Add a `threadpool` parameter to `Channel` constructor
-->
- [x] #50874 <!-- Restrict COFF to a single thread when symbol count is
high -->
- [x] #50822 <!-- Add default method for setmodifiers! -->
- [x] #50730 <!-- Fix integer overflow in `isapprox` -->
- [x] #50850 <!-- Remove weird Rational dispatch and add pi functions to
list -->
- [x] #50809 <!-- Limit type-printing in MethodError -->
- [x] #50915 <!-- Add note the `Task` about sticky bit -->
- [x] #50929 <!-- when widening tuple types in tmerge, only widen the
complex parts -->
- [x] #50928 <!-- Bump JuliaSyntax to 0.4.6 -->
- [x] #50959 <!-- Update libssh2 patches -->
- [x] #50823 <!-- Make ranges more robust with unsigned indexes. -->
- [x] #48542 <!-- Add docs on task-specific buffering using
multithreading -->
- [x] #50912 <!-- Separate foreign threads into a :foreign threadpool
-->
- [x] #51010 <!-- Add ORIGIN to SuiteSparse rpath on Linux/FreeBSD -->
- [x] #50753 <!-- cat: remove unused promote_eltype methods that confuse
inference -->
- [x] #51027 <!-- Implement realloc accounting correctly -->
- [x] #51019 <!-- fix a case of potentially use of undefined variable
when handling error in distributed message processing -->
- [x] #51039 <!-- Revert "Optimize findall(f, ::AbstractArray{Bool})
(#42202)" -->
- [x] #51036 <!-- add missing invoke edge for nospecialize targets -->
- [x] #51042 <!-- inference: fix return_type_tfunc modeling of concrete
functions -->
- [x] #51114 <!-- Workaround upstream FreeBSD issue #272992 -->
- [x] #50892 <!-- Add `JL_DLLIMPORT` to `small_typeof` declaration -->
- [x] #51154 <!-- broadcast: use recursion rather than ntuple to map
over a tuple -->
- [x] #51153 <!-- fix debug typo in "add missing invoke edge for
nospecialize targets (#51036)" -->
- [x] #51222 <!-- Check again if the tty is open inside the IO lock -->
- [x] #51236 <!-- Add lock around uv_unref during init -->
- [x] #51243 <!-- GMP: Gracefully handle more overflows. -->
- [x] #51254 <!-- Ryu: make sure adding zeros does not overwrite
trailing dot -->
- [x] #51175 <!-- shorten stale_age for cachefile lock -->
- [x] #51300 <!-- fix method definition error for bad vararg -->
- [x] #51307 <!-- fix force-throw ctrl-C on Windows -->
- [x] #51303 <!-- ensure revising structs is safe -->
- [x] #51393 
- [x] #51403 

Need manual backport:
- [x] #51009 <!-- fix #50562, regression in `in` of tuple of Symbols -->
- [x] #51053 <!-- Bump Statistics stdlib -->
- [x] #51013 <!-- fix #50709, type bound error due to free typevar in
sparam env -->
- [x] #51305 <!-- reduce test time for rounding and floatfuncs -->

Contains multiple commits, manual intervention needed:
- [ ] #50663 <!-- Fix Expr(:loopinfo) codegen -->
- [ ] #51035 <!-- refactor GC scanning code to reflect jl_binding_t are
now first class -->
- [ ] #51092 <!-- inference: fix bad effects for recursion -->
- [x] #51247 <!-- Check if malloc has succeeded before incrementing gc
stats -->
- [x] #51294 <!-- use LibGit2_jll for LibGit2 library -->

Non-merged PRs with backport label:
- [ ] #51132 <!-- Handle `AbstractQ` in concatenation -->
- [x] #51029 <!-- testdefs: make sure that if a test set changes the
active project, they change it back when they're done -->
- [ ] #50919 <!-- Code loading: do the "skipping mtime check for stdlib"
check regardless of the value of `ispath(f)` -->
- [ ] #50824 <!-- Add some aliasing warnings to docstrings for mutating
functions -->
- [x] #50385 <!-- Precompile pidlocks: add to NEWS and docs -->
- [ ] #49805 <!-- Limit TimeType subtraction to AbstractDateTime -->
@mbauman mbauman changed the base branch from master to release-1.10 October 3, 2023 14:52
@nathanrboyer
Copy link
Contributor Author

nathanrboyer commented Oct 3, 2023

Motivated by this Discourse post.

Only the last commit is mine. I clicked on source from the documentation website. Then Edit with: Github.dev. Then commit and push. Not sure what I did wrong ... 😬

@mbauman
Copy link
Member

mbauman commented Oct 3, 2023

Yeah, it looks like you made this change against the release-1.10 branch (which meant that when it targeted master, it brought in lots of unrelated and conflicting commits). I think the change itself is a good idea, but you'll need to retarget it to the master branch. If you're doing this on the web, it's probably easiest to just close this PR and try again specifically against the master branch.

@mbauman mbauman changed the base branch from release-1.10 to master October 3, 2023 14:59
@brenhinkeller brenhinkeller added the docs This change adds or pertains to documentation label Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs This change adds or pertains to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.