Enable #[thread_local] on armv6k-nintendo-3ds#16
Enable #[thread_local] on armv6k-nintendo-3ds#16Meziu merged 1 commit intoMeziu:armv6k-3ds-targetfrom ian-h-chamberlain:feature/target-thread-local
Conversation
|
Change the target branch from |
|
@Meziu done. We probably shouldn't submit a PR just yet while it's still segfaulting in std code, though... |
Yeah obviously 😆. I just use this branch for target-related commits since we can push those whenever we need to. |
We should probably rebase onto the latest master branch commit just to make sure we don't run into merge conflicts when we open the PR. And we can use a new branch since those commits in |
|
Adding an note here that the segfault might not occur if thread destructors aren't called in pthread: |
|
Need to test again with the latest set of thread changes – this might be a non-issue now and we could try to upstream, but I have been working on other things and haven't had a chance. |
|
Tested this with the thread changes. It works perfectly, though I suggest putting the I'm pretty sure this check is completely useless, as it will always fail: https://github.com/Meziu/rust-horizon/blob/033ad73d19940db38606c3ea5950de2a82064d69/library/std/src/sys/unix/thread_local_dtor.rs#L31 |
|
This PR could either be added to the thread changes branch, or even be committed directly (once fixed) to Rust's master. |
Hmm, good point, I think there was a build failure in the thread branch without the |
Looking at the |
|
This PR will be closed once those two new PRs are made? |
Opened a PR against https://github.com/AzureMarker/rust-horizon/tree/feature/horizon-threads @Meziu do you want to merge it here and PR upstream, or should I close this and just open one directly to upstream? |
Just remove the changes in |
|
Oops, thought I had when I removed the other commit, but I didn't realize there's still one more change. Done |
Closes #15
This does not work currently, there is a segfault happening in the thread local destructor here. It seems the
ptrthere is incorrect somehow, causing a page fault.Still investigating but thought I would open the PR in the meantime.
@AzureMarker @Meziu