Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

systhreads: do st_thread_id after initializing the thread descriptor #596

Merged

Conversation

abbysmal
Copy link
Collaborator

This PR address the issue found at #528 (linux-O0 build.)

The mistake is pretty easy to spot, the thread id was set before initializing the related thread descriptor.

I'm not quite sure why this is only showing up in the O0 build, I would guess some checks or accesses are elided during a following optimization pass.

@ctk21
Copy link
Collaborator

ctk21 commented Jun 22, 2021

This LGTM. The -O2 optimizations are noticing that st_thread_set_id(Ident(th->descr)) can be removed because st_thread_set_id inlines to being null.

@ctk21 ctk21 merged commit 4449587 into ocaml-multicore:4.12+domains+effects Jun 22, 2021
sadiqj pushed a commit to sadiqj/ocaml that referenced this pull request Jan 10, 2022
…_c_thread_register

systhreads: do st_thread_id after initializing the thread descriptor
c-cube pushed a commit to c-cube/ocaml that referenced this pull request Feb 3, 2022
…_c_thread_register

systhreads: do st_thread_id after initializing the thread descriptor
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants