Skip to content

Instantly share code, notes, and snippets.

@DaGenix
Created June 16, 2013 19:49
Show Gist options
  • Save DaGenix/5793174 to your computer and use it in GitHub Desktop.
Save DaGenix/5793174 to your computer and use it in GitHub Desktop.
Short (possibly invalid) program that makes the rust compiler crash with an assertion
trait Printable {
fn print(&self);
}
fn test(o: &[~Printable]) {
for o.each |&p| {
p.print();
}
}
fn main() {
}
@DaGenix
Copy link
Author

DaGenix commented Jun 16, 2013

Compiling with eac0200f18bfe19646ae5dce56acc325629224cb results in:

rust: /home/enix/code/rust/src/llvm/include/llvm/IR/Instructions.h:704: llvm::Type* llvm::checkGEPType(llvm::Type*): Assertion `Ty && "Invalid GetElementPtrInst indices for type!"' failed.
Aborted (core dumped)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment