Skip to content

Conversation

@gbaraldi
Copy link
Member

I have not succeed in writing a test for this, but this was found on a CI hang together with @Keno and @vtjnash.

In essence if we hit a safepoint while GC_SAFE things can go wrong
image

@gbaraldi gbaraldi requested review from Keno and vtjnash March 26, 2024 19:04
uintptr_t item = (uintptr_t)suspended_threads.items[i];
int16_t tid = (int16_t)item;
int8_t gc_state = (int8_t)(item >> 8);
int8_t gc_state = (int8_t)(item >> 16);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do a toplevel #define for this and while we're at it, spell it 8*sizeof(int16_t).

@Keno Keno added system:mac Affects only macOS system:apple silicon Affects Apple Silicon only (Darwin/ARM64) - e.g. M1 and other M-series chips labels Mar 26, 2024
@gbaraldi gbaraldi force-pushed the gb/bitshift-issues branch from baf38b1 to 4c5c6f5 Compare March 28, 2024 14:48
@Keno Keno merged commit 1e50a99 into master Mar 28, 2024
@Keno Keno deleted the gb/bitshift-issues branch March 28, 2024 19:27
@vtjnash vtjnash added the backport 1.11 Change should be backported to release-1.11 label Jan 3, 2025
KristofferC pushed a commit that referenced this pull request Jan 13, 2025
…e previous GC state (#53868)

I have not succeed in writing a test for this, but this was found on a
CI hang together with @Keno and @vtjnash.

In essence if we hit a safepoint while GC_SAFE things can go wrong
<img width="748" alt="image"
src="https://github.com/JuliaLang/julia/assets/28694980/7d8170ee-11ab-43de-9bb1-9219aa5a2d80">

(cherry picked from commit 1e50a99)
@KristofferC KristofferC removed the backport 1.11 Change should be backported to release-1.11 label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

system:apple silicon Affects Apple Silicon only (Darwin/ARM64) - e.g. M1 and other M-series chips system:mac Affects only macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants