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 julia v1.10.0-beta2 #50708

Merged
merged 34 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
ea34b13
Remove SparseArrays legacy code (#50637)
dkarrasch Jul 24, 2023
6ea6ddd
print `@time` msg into print buffer (#50665)
IanButterworth Jul 25, 2023
d673a25
Avoid generic call in most cases for getproperty (#50523)
gbaraldi Jul 25, 2023
291dc6b
`versioninfo()`: include build info and unofficial warning (#50635)
IanButterworth Jul 26, 2023
528d4ed
Make reinterpret specialize fully. (#50670)
gbaraldi Jul 27, 2023
21fe723
include `--pkgimage=no` caches for stdlibs (#50666)
IanButterworth Jul 27, 2023
821f6a5
effects: fix `:nothrow` modeling of `getglobal` (#50765)
aviatesk Aug 2, 2023
f10c461
irinterp: refine `:nothrow` only when it is not proved yet (#50764)
aviatesk Aug 3, 2023
2a70dac
ssair: `compact!` constant `PiNode` (#50768)
aviatesk Aug 3, 2023
9e9f67d
optimizer: move inlineable constants into argument position during `c…
aviatesk Aug 3, 2023
80ccc37
inference: continue const-prop' when concrete-eval returns non-inline…
aviatesk Aug 5, 2023
4799388
Attach `tanpi` docstring to method (#50689)
sostock Jul 29, 2023
6a8559d
Fix rdiv of complex lhs by real factorizations (#50671)
dkarrasch Jul 29, 2023
2e71492
only limit types in stack traces in the REPL (#50598)
JeffBezanson Aug 1, 2023
ac0eec2
Don't partition alwaysinline functions (#50766)
pchintalapudi Aug 2, 2023
aed6f5a
re-allow non-string values in ENV `get!` (#50771)
JeffBezanson Aug 3, 2023
8cfb350
Add fallback if we have make a weird GC decision. (#50682)
gbaraldi Aug 5, 2023
e57f1c7
fix `bit_map!` with aliasing (#50781)
oscardssmith Aug 5, 2023
9b78fb5
print feature flags used for matching pkgimage (#50172)
vchuravy Aug 7, 2023
98db4d5
Bump OpenBLAS binaries to use the new GEMM multithreading threshold (…
ViralBShah Aug 9, 2023
c5e7846
Update dependency builds (#50826)
ararslan Aug 9, 2023
e22d308
fix #50438, use default pool for at-threads (#50845)
JeffBezanson Aug 9, 2023
c33aad8
`Array(::AbstractRange)` should return an `Array` (#50568)
jishnub Jul 24, 2023
3e133c9
fix hashing regression. (#50655)
oscardssmith Jul 26, 2023
27bc777
Add `Base.get_extension` to docs/API (#50860)
SBuercklin Aug 10, 2023
185dd81
Makes IntrusiveLinkedListSynchronized mutable to avoid allocation on …
andrebsguedes Aug 10, 2023
8ad72d3
Reuse incremental JIT compilation for --image-codegen (#50649)
pchintalapudi Jul 26, 2023
e549d74
Merge opaque closure modules with the rest of the workqueue (#50724)
pchintalapudi Jul 31, 2023
6ba470d
Add alignment to constant globals (#50738)
pchintalapudi Aug 2, 2023
081bc5c
Minor refactor to image generation (#50779)
pchintalapudi Aug 4, 2023
013e951
Make symbols internal in jl_create_native, and only externalize them …
pchintalapudi Aug 8, 2023
6b636b9
Combined compilation fixes
pchintalapudi Aug 10, 2023
f9afbbb
macOS: Don't inspect dead threadtls during exception handling. (#50871)
maleadt Aug 11, 2023
1fc06f2
Change addprocs limit to total_memory instead of free memory.
gbaraldi Aug 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix bit_map! with aliasing (#50781)
fixes #50780 caused by #47013.

(cherry picked from commit 3e04129)
  • Loading branch information
oscardssmith authored and KristofferC committed Aug 10, 2023
commit e57f1c7d050bdac541120ea9d20fc77e203faaa9
10 changes: 6 additions & 4 deletions base/bitarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1791,9 +1791,10 @@ function bit_map!(f::F, dest::BitArray, A::BitArray) where F
dest_last = destc[len_Ac]
_msk = _msk_end(A)
# first zero out the bits mask is going to change
destc[len_Ac] = (dest_last & (~_msk))
# then update bits by `or`ing with a masked RHS
destc[len_Ac] |= f(Ac[len_Ac]) & _msk
# DO NOT SEPARATE ONTO TO LINES.
# Otherwise there will be bugs when Ac aliases destc
destc[len_Ac] = (dest_last & (~_msk)) | f(Ac[len_Ac]) & _msk
dest
end
function bit_map!(f::F, dest::BitArray, A::BitArray, B::BitArray) where F
Expand All @@ -1812,9 +1813,10 @@ function bit_map!(f::F, dest::BitArray, A::BitArray, B::BitArray) where F
dest_last = destc[len_Ac]
_msk = _msk_end(min_bitlen)
# first zero out the bits mask is going to change
destc[len_Ac] = (dest_last & ~(_msk))
# then update bits by `or`ing with a masked RHS
destc[len_Ac] |= f(Ac[end], Bc[end]) & _msk
# DO NOT SEPARATE ONTO TO LINES.
# Otherwise there will be bugs when Ac or Bc aliases destc
destc[len_Ac] = (dest_last & ~(_msk)) | f(Ac[end], Bc[end]) & _msk
dest
end

Expand Down
15 changes: 15 additions & 0 deletions test/bitarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1539,6 +1539,21 @@ timesofar("reductions")
end
end
end
@testset "Issue #50780, map! bitarray map! where dest aliases source" begin
a = BitVector([1,0])
b = map(!, a)
map!(!, a, a) # a .= !.a
@test a == b == BitVector([0,1])

a = BitVector([1,0])
c = map(|, a, b)
map!(|, a, a, b)
@test c == a == BitVector([1, 1])

a = BitVector([1,0])
map!(|, b, a, b)
@test c == b == BitVector([1, 1])
end
end

## Filter ##
Expand Down