Skip to content

Internal compiler error #26233

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

Closed
maurizi opened this issue Jun 12, 2015 · 3 comments
Closed

Internal compiler error #26233

maurizi opened this issue Jun 12, 2015 · 3 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@maurizi
Copy link

maurizi commented Jun 12, 2015

I'm using an MSYS2 shell on Windows 7 64bit. I tested this on 1.0, the 1.1 beta, and the latest nightly (rustc 1.1.0-nightly (21f278a68 2015-04-23) (built 2015-04-24)).

When I try to compile maurizi/rsnotify@68db23b using cargo build --verbose I get the following error:

$ cargo build --verbose
       Fresh libc v0.1.8
       Fresh walker v1.0.0
       Fresh gcc v0.3.8
       Fresh bitflags v0.2.1
       Fresh log v0.3.1
       Fresh winapi v0.1.20
       Fresh kernel32-sys v0.1.0
   Compiling notify v2.0.0 (file:///C:/Users/Mike/Documents/code/rsnotify)
     Running `rustc src\lib.rs --crate-name notify --crate-type lib -g -C metadata=680f9051ec03eca4 -C extra-filename=-680f9051ec03eca4 --out-dir C:\Users\Mike\Documents\code\rsnotify\target\debug --emit=dep-info,link -L dependency=C:\Users\Mike\Documents\code\rsnotify\target\debug -L dependency=C:\Users\Mike\Documents\code\rsnotify\target\debug\deps --extern libc=C:\Users\Mike\Documents\code\rsnotify\target\debug\deps\liblibc-2eda841eb12a3090.rlib --extern time=C:\Users\Mike\Documents\code\rsnotify\target\debug\deps\libtime-f08bec52f4924e95.rlib --extern kernel32=C:\Users\Mike\Documents\code\rsnotify\target\debug\deps\libkernel32-852914e74bb6c4c5.rlib --extern bitflags=C:\Users\Mike\Documents\code\rsnotify\target\debug\deps\libbitflags-6ad6262463ad8b4b.rlib --extern walker=C:\Users\Mike\Documents\code\rsnotify\target\debug\deps\libwalker-80db320aa147f996.rlib --extern log=C:\Users\Mike\Documents\code\rsnotify\target\debug\deps\liblog-54cf393d3c69686f.rlib --extern winapi=C:\Users\Mike\Documents\code\rsnotify\target\debug\deps\libwinapi-529c97af7e4635ff.rlib -L native=C:\Users\Mike\Documents\code\rsnotify\target\debug\build\time-f08bec52f4924e95\out`
       Fresh time v0.1.26
src\windows.rs:19:27: 19:29 warning: unused import, #[warn(unused_imports)] on by default
src\windows.rs:19 use super::{Event, Error, op, Op, Watcher};
                                            ^~
src\windows.rs:19:31: 19:33 warning: unused import, #[warn(unused_imports)] on by default
src\windows.rs:19 use super::{Event, Error, op, Op, Watcher};
                                                ^~
src\windows.rs:31:5: 31:22 warning: struct field is never used: `tx`, #[warn(dead_code)] on by default
src\windows.rs:31     tx: Sender<Event>,
                      ^~~~~~~~~~~~~~~~~
src\windows.rs:33:5: 33:19 warning: struct field is never used: `handle`, #[warn(dead_code)] on by default
src\windows.rs:33     handle: HANDLE
                      ^~~~~~~~~~~~~~
src\windows.rs:82:17: 86:20 warning: unused result which must be used, #[warn(unused_must_use)] on by default
src\windows.rs:82                 self.tx.send(Event {
src\windows.rs:83                     path: None,
src\windows.rs:84                     // TODO: Call GetLastError for better error info?
src\windows.rs:85                     op: Err(Error::WatchNotFound)
src\windows.rs:86                 });
src\windows.rs:118:17: 118:24 warning: unused variable: `success`, #[warn(unused_variables)] on by default
src\windows.rs:118             let success = kernel32::ReadDirectoryChangesW(
                                   ^~~~~~~
src\windows.rs:144:56: 144:61 warning: unused variable: `bytes`, #[warn(unused_variables)] on by default
src\windows.rs:144 unsafe extern "system" fn handle_event(errorCode: u32, bytes: u32, overlapped: LPOVERLAPPED) {
                                                                          ^~~~~
src\windows.rs:151:9: 151:16 warning: unused variable: `request`, #[warn(unused_variables)] on by default
src\windows.rs:151     let request: Box<ReadDirectoryRequest> = mem::transmute((*overlapped).hEvent);
                           ^~~~~~~
src\windows.rs:144:40: 144:49 warning: variable `errorCode` should have a snake case name such as `error_code`, #[warn(non_snake_case)] on by default
src\windows.rs:144 unsafe extern "system" fn handle_event(errorCode: u32, bytes: u32, overlapped: LPOVERLAPPED) {
                                                          ^~~~~~~~~
src\windows.rs:168:9: 168:57 warning: unused result which must be used, #[warn(unused_must_use)] on by default
src\windows.rs:168         self.tx.send(Action::Watch(path.to_path_buf()));
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src\windows.rs:173:9: 173:59 warning: unused result which must be used, #[warn(unused_must_use)] on by default
src\windows.rs:173         self.tx.send(Action::Unwatch(path.to_path_buf()));
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src\windows.rs:180:9: 180:36 warning: unused result which must be used, #[warn(unused_must_use)] on by default
src\windows.rs:180         self.tx.send(Action::Stop);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Assertion failed!

Program: C:\Programs\Rust\bin\rustc.exe
File: C:/bot/slave/nightly-dist-rustc-win-64/build/src/llvm/include/llvm/IR/Instructions.h, Line 782

Expression: Ty && "Invalid GetElementPtrInst indices for type!"
Could not compile `notify`.

Caused by:
  Process didn't exit successfully: `rustc src\lib.rs --crate-name notify --crate-type lib -g -C metadata=680f9051ec03eca4 -C extra-filename=-680f9051ec03eca4 --out-dir C:\Users\Mike\Documents\code\rsnotify\target\debug --emit=dep-info,link -L dependency=C:\Users\Mike\Documents\code\rsnotify\target\debug -L dependency=C:\Users\Mike\Documents\code\rsnotify\target\debug\deps --extern libc=C:\Users\Mike\Documents\code\rsnotify\target\debug\deps\liblibc-2eda841eb12a3090.rlib --extern time=C:\Users\Mike\Documents\code\rsnotify\target\debug\deps\libtime-f08bec52f4924e95.rlib --extern kernel32=C:\Users\Mike\Documents\code\rsnotify\target\debug\deps\libkernel32-852914e74bb6c4c5.rlib --extern bitflags=C:\Users\Mike\Documents\code\rsnotify\target\debug\deps\libbitflags-6ad6262463ad8b4b.rlib --extern walker=C:\Users\Mike\Documents\code\rsnotify\target\debug\deps\libwalker-80db320aa147f996.rlib --extern log=C:\Users\Mike\Documents\code\rsnotify\target\debug\deps\liblog-54cf393d3c69686f.rlib --extern winapi=C:\Users\Mike\Documents\code\rsnotify\target\debug\deps\libwinapi-529c97af7e4635ff.rlib -L native=C:\Users\Mike\Documents\code\rsnotify\target\debug\build\time-f08bec52f4924e95\out` (exit code: 3)

If I comment out the body of this function it will successfully compile maurizi/rsnotify@fc28778. Though it seems to be the if let statement causing the issue: if I leave out the unsafe body in the if let block, I still get an ICE

@huonw huonw added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jun 12, 2015
@Stebalien
Copy link
Contributor

Related to #23649? It's the same assertion.

@Mark-Simulacrum
Copy link
Member

Issue #23649 has been closed. The commit linked above does not compile, but also does not ICE.

@Mark-Simulacrum
Copy link
Member

I'm going to close per my previous comment.

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

4 participants