-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
Revert "Split core.thread.fiber to package.d and base.d" #16850
base: master
Are you sure you want to change the base?
Conversation
This reverts commit b13c0cd.
Thanks for your pull request, @ibuclaw! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#16850" |
This would be the preferred choice here. |
@ibuclaw why reverting instead of fixing? ~2 months no one noticed this problem |
I didn't look too deeply, but it's a chance that won't work either - what is allowed inside |
No one thought to test, it shouldn't be down on me to check all permutations on a regular basis. |
What is reason why this happens? For example, maybe Phobos library binary are built on system where there is |
No, the Fiber Platform Detection code needs to exist in all modules that any fiber package gets split into. |
But this is not a "code" - it is only executed during compilation on platforms which provides I.e., I don't understand nature of the error that is occurring here |
That's not how fiber detection works. Ucontext is used if all else fails (or there is a shadow stack such as Intel CET). There's a split brain as one module detects it should use ucontext, but the other does no detection.
Then this should be merged to unbreak master. |
This is what I don't understand:
How does this literally happens? How the same compile-time expression in the same environment can be compiled with different result? |
Because of the fiber detection code influences it. |
"fiber detection code" is static if (__traits(compiles, ucontext_t)) ? If "yes" we returning to this question: #16850 (comment) |
Reverts #16695
Splitting cannot be done unless the Fiber detection code is either:
version
anymore)https://github.com/dlang/dmd/blob/master/druntime/src/core/thread/fiber/package.d#L22-L165
Without, the
static if (__traits(compiles, ucontext_t))
condition in both modules resolves to different values, causing build failures onucontext_t
targets.