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

ICE - Unprintable span #32697

Closed
thepowersgang opened this issue Apr 3, 2016 · 5 comments
Closed

ICE - Unprintable span #32697

thepowersgang opened this issue Apr 3, 2016 · 5 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@thepowersgang
Copy link
Contributor

Encountered using heavy-duty macro abuse and reproduced on current nightly.

https://travis-ci.org/thepowersgang/rust_os/builds/120407504#L340

Code being built:
https://github.com/thepowersgang/rust_os/blob/20160403_ice_unprintable/Usermode/libsyscalls/

(Sorry for the lacklustre report, I will attempt to reduce to a testcase in a few hours)

@alexcrichton alexcrichton added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Apr 3, 2016
@thepowersgang
Copy link
Contributor Author

Smaller reproduction - https://gist.github.com/thepowersgang/fc6170c10aa11347104ce54cafb124d0, Doesn't appear on playpen so is likely related to the multiple-file structure

@thepowersgang
Copy link
Contributor Author

Fully reduced to under 30 lines. The error appears when the macro invocation is in a different file to the definition.

lib.rs:6:9: 3:23 error: unresolved name `values::VFS_OPENNODE` [E0425]
(internal compiler error: unprintable span)
vfs.rs:3:2: 3:25 note: in this expansion of syscall! (defined in lib.rs)
lib.rs:6:9: 3:23 help: run `rustc --explain E0425` to see a detailed explanation
error: aborting due to previous error

When the invocation is moved into lib.rs (still in the vfs module) a span is printed (but not a very good one)

@durka
Copy link
Contributor

durka commented Apr 4, 2016

Some older unprintable spans @ #31719. Doesn't seem very related though.

@tiehuis
Copy link
Contributor

tiehuis commented Apr 10, 2016

Just ran into something similar. This may be related (may not, but involves some macro use as in the first). Here is the simplified test case in this example.

https://gist.github.com/tiehuis/2000a3e1a3e2cfdd031208863b75f9f5

This generates an error on a single file which appears slightly different to the previous example. Fails on the playpen nightly branch.

rustc --version --verbose
rustc 1.9.0-nightly (177905703 2016-04-08)
binary: rustc
commit-hash: 17790570373a7f560950d53ea4d67807232db255
commit-date: 2016-04-08
host: x86_64-unknown-linux-gnu
release: 1.9.0-nightly

And the error in question:

rustup run nightly rustc main.rs
main.rs:11:6: 6:19 error: mismatched types:
 expected `&'static Bar`,
    found `Bar`
(expected &-ptr,
    found struct `Bar`) [E0308]
(internal compiler error: unprintable span)
main.rs:11:1: 11:11 note: in this expansion of foo! (defined in main.rs)
main.rs:11:6: 6:19 help: run `rustc --explain E0308` to see a detailed explanation

@Mark-Simulacrum
Copy link
Member

No longer ICEs.

error[E0425]: cannot find value `VFS_OPENNODE` in module `values`
 --> ./vfs.rs:3:11
  |
3 | 	syscall!(VFS_OPENNODE);
  | 	         ^^^^^^^^^^^^ not found in `values`

error: aborting due to previous error

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

5 participants