-
Notifications
You must be signed in to change notification settings - Fork 197
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
Building with hardening build flags #157
Comments
This results in
the build complains about missing SYS_futex. Oh right, because musl's stack guard implementation is per-thread, but WASI doesn't support that at the moment. So I suppose the proper fix would be to implement a non-threaded version of this stack guard. |
The warning flags should work as expected. -fstack-protector is indeed not implemented yet, and yes, you may be right that all that's needed right now is a non-threaded implementation. That said, the -fstack-protector feature is not nearly as important on wasm as it is on typilcal native platforms because wasm's callstack is outside of the program address space, so it's never possible to clobber a return address on the stack. -Wl,-z,relro isn't yet meaningful on wasm, since we don't have dynamic linking yet, and depending on how dynamic linking ends up working, relro may not be needed. |
Thanks for confirming! For now I'll just append the |
Closing as answered; feel free to reopen or file a new issue if there are further questions! |
Debian builds with these build flags by default:
Overriding
WASM_CFLAGS
with these, results in the following metadata diff:Of course, I don't expect hardening flags to make much sense on wasm32 right now, but perhaps they would make sense in the future. Please advise me on whether I should retain these flags, or drop them, bearing in mind the future.
The text was updated successfully, but these errors were encountered: