Skip to content

#[link_section] static FOO can contain undefined bytes on wasm #60633

Closed
@oli-obk

Description

@oli-obk

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.

Metadata

Metadata

Assignees

Labels

A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)A-linkageArea: linking into static, shared libraries and binariesC-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions