#[link_section] static FOO
can contain undefined bytes on wasm
#60633
Labels
A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
A-linkage
Area: linking into static, shared libraries and binaries
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
O-wasm
Target: WASM (WebAssembly), http://webassembly.org/
https://github.com/rust-lang/rust/blob/e80c86c535b74cdd65c4b75b94ce38342d0bb946/src/librustc_typeck/check/mod.rs#L1444-L1467 only checks that the link section contains no pointers, but there may be arbitrary bytes in the data, even undefined bytes (e.g. due to padding).
cc @alexcrichton is that ok? llvm may insert
undef
whereever there are undefined bytes. Or should we lint/error on such statics?This issue has been assigned to @Chocol4te via this comment.
The text was updated successfully, but these errors were encountered: