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

Wasm targets should append lld --stack-first (again) #10567

Closed
zetanumbers opened this issue Jan 11, 2022 · 6 comments · Fixed by #10572
Closed

Wasm targets should append lld --stack-first (again) #10567

zetanumbers opened this issue Jan 11, 2022 · 6 comments · Fixed by #10572
Labels
arch-wasm 32-bit and 64-bit WebAssembly bug Observed behavior contradicts documented or intended behavior regression It worked in a previous version of Zig, but stopped working.
Milestone

Comments

@zetanumbers
Copy link

Zig Version

0.9.0

Steps to Reproduce

Expected Behavior

Stack should begin before globals on wasm targets according to #4496, i. e.

(global $__stack_pointer (mut i32) (i32.const 8192))

Actual Behavior

(global $__stack_pointer (mut i32) (i32.const 14816))
@zetanumbers zetanumbers added the bug Observed behavior contradicts documented or intended behavior label Jan 11, 2022
@andrewrk andrewrk added this to the 0.9.1 milestone Jan 12, 2022
@andrewrk andrewrk added arch-wasm 32-bit and 64-bit WebAssembly regression It worked in a previous version of Zig, but stopped working. labels Jan 12, 2022
@sporksmith
Copy link

I see that this issue is marked closed, but it's assigned to the 0.9.1 milestone and afaict the fix isn't in the 0.9.x branch. Is this a mistake?

@andrewrk
Copy link
Member

No mistake - I haven't cherry picked into the 0.9.x branch for a week or so. Will be sure to grab this one.

@andrewrk
Copy link
Member

Pushed to 0.9.x branch. Let me know if you think I should cherry-pick an additional fix that did not make it.

@sporksmith
Copy link

Pushed to 0.9.x branch. Let me know if you think I should cherry-pick an additional fix that did not make it.

Thanks, that simplifies our decision on what the zig 0.9.1 behavior should be in the next release of wasm4 :)

@andrewrk
Copy link
Member

Worth noting is that this one made it in there too: #10517 (Thanks @Luukdegram!)

That should address binary bloat that I'm guessing many people were experiencing before.

@sporksmith
Copy link

Worth noting is that this one made it in there too: #10517 (Thanks @Luukdegram!)

Ah good to know! We've been working around it by redundantly specifying the exports in the build script, but it'll be nice to remove that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm 32-bit and 64-bit WebAssembly bug Observed behavior contradicts documented or intended behavior regression It worked in a previous version of Zig, but stopped working.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants