-
-
Notifications
You must be signed in to change notification settings - Fork 610
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
Fix 22942 - Check for S_TRHEAD_LOCAL_ZEROFILL alongside S_ZEROFILL #13890
Fix 22942 - Check for S_TRHEAD_LOCAL_ZEROFILL alongside S_ZEROFILL #13890
Conversation
|
Thanks for your pull request and interest in making D better, @MoonlightSentinel! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
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 "stable + dmd#13890" |
9a695a8 to
017497c
Compare
|
Seems to be an issue introduced by newer MacOS 12? |
2447a5f to
23f1420
Compare
| // fflush(stdout); | ||
|
|
||
| const flags = (I64 ? SecHdrTab64[idx].flags : SecHdrTab[idx].flags); | ||
| if (flags == S_ZEROFILL || flags == S_THREAD_LOCAL_ZEROFILL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't the error message imply the check should be if(!(flags == S_ZEROFILL...))?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think so. The if deals with zero-initialised sections whose size only stored in SDoffset.
FYI the section referenced in the error message is marked as S_THREAD_LOCAL_ZEROFILL
a252167 to
6579640
Compare
d54af66 to
002b749
Compare
1740564 to
b505033
Compare
.cirrus.yml
Outdated
| @@ -93,6 +93,8 @@ macos12_task: | |||
| OS: osx | |||
| # 12 CPU cores and 24 GB of memory are available | |||
| N: 12 | |||
| # Temporarily use LDC until a release with a fix for issue 22942 is available (probably 2.101) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest adding FIXME: to avoid potentially forgetting about this indefinitely and change the name of the tasks, otherwise, people think it's being compiled on DMD.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the FIXME:. Initially renamed the job but Github still waited for the old job - even though the new job was run successfully. So I would rather keep it for now to unblock the CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the
FIXME:. Initially renamed the job but Github still waited for the old job - even though the new job was run successfully. So I would rather keep it for now to unblock the CI.
This is because Github has required on that CI job for that branch in their rules. You need to go to Settings, somewhere in Protected Branches and deselect that job from being required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have permissions, so I can't do it, but probably @RazvanN7 or someone else can do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're probably right. Hardly worth the effort though given that these changes will need to be reverted soon (TM)
b505033 to
08ff060
Compare
DMD releases cannot compile for XCode >= 13.3 because of issue 22942.
The code generated an unexpected / invalid header for the `thread_bss`
section marked as `S_TRHEAD_LOCAL_ZEROFILL`. The generated object file
is rejected by ld included in newer XCode versions (>= 13.3).
E.g.
```
ld: section __DATA/__thread_bss has type zero-fill but non-zero file
offset file '../generated/build.o' for architecture x86_64
```
This patch changes the existing code to treat `S_TRHEAD_LOCAL_ZEROFILL`
like `S_ZEROFILL` w.r.t. the section size.
|
Lets get this in to unblock the pipelines. |
|
Also this will need to be cherrypicked to master as well to unblock it, too. |
|
I'll open a PR to merge |
|
Thank you for tracking this down! This looks really hairy. |
The code generated an unexpected / invalid header for the
thread_bsssection marked as
S_TRHEAD_LOCAL_ZEROFILL. The generated object fileis rejected by ld included in newer XCode versions (>= 13.3).
E.g.
This patch changes the existing code to treat
S_TRHEAD_LOCAL_ZEROFILLlike
S_ZEROFILLw.r.t. the section size.The CirrusCI jobs need to use LDC until a working dmd release is available