Skip to content
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

Build build.d with symbols #10731

Merged
merged 1 commit into from
Jan 17, 2020
Merged

Conversation

CyberShadow
Copy link
Member

Helps debug build issues when build.d crashes.

Helps debug build issues when build.d crashes.
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @CyberShadow!

Bugzilla references

Your 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 locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub fetch digger
dub run digger -- build "master + dmd#10731"

CyberShadow added a commit to CyberShadow/ae that referenced this pull request Jan 17, 2020
Helps debug build issues when build.d crashes.

Upstreamed: dlang/dmd#10731
Copy link
Contributor

@MoonlightSentinel MoonlightSentinel left a comment

Choose a reason for hiding this comment

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

Did you encounter a specific issue?

@CyberShadow
Copy link
Member Author

CyberShadow commented Jan 17, 2020

Yes, but it manifests only under Wine and Windows versions before 7. The bug is in Phobos, I plan to submit a fix to Wine and Phobos later.

https://bugs.winehq.org/show_bug.cgi?id=48471

@dlang-bot dlang-bot merged commit e1871b6 into dlang:master Jan 17, 2020
@Geod24
Copy link
Member

Geod24 commented Jan 17, 2020

@CyberShadow : Sorry to hijack, but as I was going over the druntime issues yesterday, I saw this one.
From your message, it looks like we could make it WONTFIX since we can compile using build.d instead ?

@CyberShadow
Copy link
Member Author

Yes, I don't see why you wouldn't want to just run the entire build under Wine. Not sure how build.d relates to this, since you could do this before and after build.d (the above Wine bug notwithstanding). With the Wine bug patched locally, I can get Digger to build D for Windows under Wine (though currently -m64 is a bit broken, which is what I'm working on now).

There's a longer standing problem with -m32 under Wine - OPTLINK seems to have some kind of synchronization bug that's exposed only under Wine, which causes it to hang. The Microsoft linker doesn't have this problem though.

@rainers
Copy link
Member

rainers commented Jan 17, 2020

There's a longer standing problem with -m32 under Wine - OPTLINK seems to have some kind of synchronization bug that's exposed only under Wine, which causes it to hang.

IIRC the exe header of optlink is patched to disable running on multiple cores (see DigitalMars/optlink#2 (comment)). Maybe wine doesn't respect that flag?

@CyberShadow
Copy link
Member Author

CyberShadow commented Jan 17, 2020

Windows and LInux both use preemptive multithreading. AFAIU, other than for some very fine details like memory ordering, restricting a task to one core doesn't shield it from multithreading bugs, as the OS could still preempt and schedule threads arbitrarily, even going as far as simulating a multi-threaded system by running one instruction from each thread in turn. So, it seems more likely that the bug is exposed by the different scheduling characteristics of the Linux task scheduler as opposed to the Windows one.

@CyberShadow
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants