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

[c#] Align lists, free alloc'ed memory before return #1055

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

yowl
Copy link
Collaborator

@yowl yowl commented Sep 17, 2024

This PR fixes the alignment of align 8 list elements. We also now use NativeMemory.AlignedAlloc for the allocation on imports, and fix the free of these allocs to be before the return instead of at the end of the block

Copy link
Collaborator

@dicej dicej left a comment

Choose a reason for hiding this comment

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

LGTM. There a a few whitespace changes which might not have been intentional; would you mind running cargo fmt to clean those up?

@alexcrichton alexcrichton added this pull request to the merge queue Sep 18, 2024
@jsturtevant
Copy link
Collaborator

would this fix some of the align issues we were having with the tests?

Merged via the queue into bytecodealliance:main with commit 3e3877d Sep 18, 2024
28 checks passed
@yowl
Copy link
Collaborator Author

yowl commented Sep 18, 2024

If they are around lists them possibly. I'm not saying I've found all the align errors, but this one manifested with WebGPU. Have we disabled some tests because of alignment issues? If so I can try enabling those.

@jsturtevant
Copy link
Collaborator

I was thinking of the variants test but looks like we fixed that a couple months ago #993

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

Successfully merging this pull request may close these issues.

4 participants