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

Fix bug with passing many args then a struct in Win64 C lib ABI #9520

Merged
merged 1 commit into from
Jun 22, 2020

Conversation

oprypin
Copy link
Member

@oprypin oprypin commented Jun 20, 2020

Also add a compilation spec for it (which actually fails on x86_64! -- see #9519)

The fix was suggested by @jhass and directly mirrors the change in #9430. The same mistake supposedly spread from the original Rust code which has since been fixed.

Chat conversation

Real function that led me to find this problem

Also add a compilation spec for it -- which actually fails on x86_64!
@jhass jhass added kind:bug A bug in the code. Does not apply to documentation, specs, etc. platform:windows labels Jun 20, 2020
@jhass jhass added the pr:ready-to-merge The changes are good to go, we need to triage merging it. label Jun 20, 2020
@bcardiff bcardiff added this to the 1.0.0 milestone Jun 22, 2020
@bcardiff bcardiff removed the pr:ready-to-merge The changes are good to go, we need to triage merging it. label Jun 22, 2020
@@ -84,6 +84,36 @@ describe "Code gen: C ABI" do
), &.to_i.should eq(6))
end

{% if flag?(:x86_64) && !flag?(:win32) %}
pending "passes struct after many other args (for real) (#9519)"
Copy link
Member

Choose a reason for hiding this comment

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

Why the spec does not apply on non-windows platform?

Copy link
Member

@jhass jhass Jun 22, 2020

Choose a reason for hiding this comment

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

Because it's broken there too, but a bit harder to fix (and maybe arguably out of scope here, wanting to fix it for the windows ABI).

The actual spec is below and enabled for windows.

Copy link
Member

Choose a reason for hiding this comment

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

Ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. platform:windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants