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 WASM for LLVM6 #17

Merged
merged 1 commit into from
Feb 12, 2018
Merged

Fix WASM for LLVM6 #17

merged 1 commit into from
Feb 12, 2018

Conversation

Mirclus
Copy link
Contributor

@Mirclus Mirclus commented Feb 12, 2018

Based on the implementation in dlmalloc-rs.

I'm not sure how to handle the error case. Panic? I didn't change the behavior for now.

Also, if I understand the Intrinsic correctly, both input parameter and return value should have the same type. Dlmalloc doesn't follow this either, but it uses a fixed size for the argument. I'm not really sure if this is something that should get changed.

Should fix #16.

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

Thanks!

We can go ahead and land this now, panicking is fine since that is what we currently do.

However, now that we can check for failure, we can also modify the alloc_pages signature so that the function returns Result<*mut u8, ()> (here and in imp_unix.rs) and properly return and propagate errors.

Interested in doing this as a follow up PR as well?

@fitzgen fitzgen merged commit cbf738f into rustwasm:master Feb 12, 2018
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.

Rust upgrade to LLVM6 breaks wee_alloc
2 participants