Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upno_std + owned_box: thread 'rustc' has overflowed its stack Illegal instruction (core dumped) #21599
Comments
This comment has been minimized.
This comment has been minimized.
|
Stacktrace:
Appears like a more minimal #![no_std]
#![feature(lang_items)]
extern crate core;
#[lang="start"]
fn main() {
}
#[lang = "stack_exhausted"] extern fn stack_exhausted() {}
#[lang = "eh_personality"] extern fn eh_personality() {}
#[lang = "panic_fmt"] fn panic_fmt() -> ! { loop{} }still causes it, which suggests this is a duplicate of #20918. Thanks for the report! |
kmcallister
added
I-ICE
A-freestanding
labels
Jan 25, 2015
This comment has been minimized.
This comment has been minimized.
|
Doesn't look like a dupe to me, and still ICEs with minor changes: #![no_std]
#![feature(box_syntax,unique)]
#![feature(no_std,core,lang_items)]
extern crate core;
use core::ptr::Unique;
#[lang="owned_box"]
pub struct Box<T>(Unique<T>);
#[lang="start"]
fn main() {
let mut test:[isize;1] = [0;1];
let a = box 5;
test[*a] = 0;
}
#[lang = "exchange_malloc"] extern fn exchange_malloc() {}
#[lang = "stack_exhausted"] extern fn stack_exhausted() {}
#[lang = "eh_personality"] extern fn eh_personality() {}
#[lang = "panic_fmt"] fn panic_fmt() -> ! { loop{} }$ rustc main.rs
error: internal compiler error: unexpected panic
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: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'assertion failed: dest.is_some()', /Users/tamird/src/rust/src/librustc_trans/trans/callee.rs:844 |
This comment has been minimized.
This comment has been minimized.
|
The backtrace for above:
This bug appears to be caused by invalid signature of start language item. This will be fixed when (is a dupe, in a sense) #9307 is. |
wheals
added a commit
to wheals/glacier
that referenced
this issue
Oct 26, 2015
This comment has been minimized.
This comment has been minimized.
|
New updated code:
|
This comment has been minimized.
This comment has been minimized.
|
@steveklabnik's code is no longer valid. |
brson
added
P-low
T-compiler
labels
Apr 11, 2017
Mark-Simulacrum
removed
the
A-freestanding
label
Jun 23, 2017
Mark-Simulacrum
added
C-bug
and removed
C-bug
labels
Jul 22, 2017
This comment has been minimized.
This comment has been minimized.
|
Updated code: #![no_std]
#![feature(box_syntax)]
#![feature(unique)]
#![feature(lang_items, ptr_internals)]
use core::ptr::Unique;
#[lang="owned_box"]
pub struct Box<T>(Unique<T>);
#[lang="start"]
fn main() {
let mut test:[isize;1] = [0;1];
let a = box 5;
test[*a] = 0;
}
#[lang = "exchange_malloc"] extern fn exchange_malloc() {}
#[lang = "eh_personality"] extern fn eh_personality() {}
#[lang = "panic_fmt"] fn panic_fmt() -> ! { loop{} }Current error message:
Duplicate of #9307 |
This comment has been minimized.
This comment has been minimized.
|
Still reproduces. Updated code:
|
This comment has been minimized.
This comment has been minimized.
|
Still a duplicate of #9307 - the signatures of at least |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thesam commentedJan 24, 2015
The following code makes rustc core dump. It is hardly a normal use case, but it would be nice if rustc failed more gracefully.