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.
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
undefwhereever there are undefined bytes. Or should we lint/error on such statics?This issue has been assigned to @Chocol4te via this comment.