Skip to content

Commit 36f85f3

Browse files
NHDalykpamnany
authored andcommitted
Try adding alignas(8) to force correct alignment and work around GCC bug
1 parent f817369 commit 36f85f3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/julia.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2288,14 +2288,15 @@ typedef struct _jl_task_t {
22882288
uint16_t priority;
22892289
// flag indicating whether or not to record timing metrics for this task
22902290
uint8_t metrics_enabled;
2291+
// (alignas(8) is needed in the following fields to work around a GCC bug. See #56626.)
22912292
// timestamp this task first entered the run queue
2292-
_Atomic(uint64_t) first_enqueued_at;
2293+
alignas(8) _Atomic(uint64_t) first_enqueued_at;
22932294
// timestamp this task was most recently scheduled to run
2294-
_Atomic(uint64_t) last_started_running_at;
2295+
alignas(8) _Atomic(uint64_t) last_started_running_at;
22952296
// time this task has spent running; updated when it yields or finishes.
2296-
_Atomic(uint64_t) cpu_time_ns;
2297+
alignas(8) _Atomic(uint64_t) cpu_time_ns;
22972298
// timestamp this task finished (i.e. entered state DONE or FAILED).
2298-
_Atomic(uint64_t) finished_at;
2299+
alignas(8) _Atomic(uint64_t) finished_at;
22992300

23002301
// hidden state:
23012302
// cached floating point environment

0 commit comments

Comments
 (0)