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

Null byte in export name causes ICE #51741

Closed
michaelwu opened this issue Jun 23, 2018 · 0 comments
Closed

Null byte in export name causes ICE #51741

michaelwu opened this issue Jun 23, 2018 · 0 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@michaelwu
Copy link
Contributor

#[export_name="\0foo"]
pub fn baz() {}

fn main () {}

outputs

   Compiling playground v0.0.1 (file:///playground)
error: internal compiler error: librustc_codegen_llvm/declare.rs:61: name "\u{0}foo" contains an interior null byte

thread 'main' panicked at 'Box<Any>', librustc_errors/lib.rs:554:9
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: aborting due to previous error


note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.28.0-nightly (cbc4c8380 2018-06-22) running on x86_64-unknown-linux-gnu

note: compiler flags: -C codegen-units=1 -C debuginfo=2 --crate-type bin

note: some of the compiler flags provided by cargo are hidden

error: Could not compile `playground`.

To learn more, run the command again with --verbose.

https://play.rust-lang.org/?gist=524f233321bcbb79fc6180ef95e38e96&version=nightly&mode=debug

@varkor varkor added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jun 23, 2018
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jun 25, 2018
…r=estebank

Add error for using null characters in #[export_name]

Fixes rust-lang#51741.
pietroalbini added a commit to pietroalbini/rust that referenced this issue Jun 26, 2018
…r=estebank

Add error for using null characters in #[export_name]

Fixes rust-lang#51741.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

2 participants