-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
no_std + owned_box: thread 'rustc' has overflowed its stack Illegal instruction (core dumped) #21599
Comments
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! |
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 |
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. |
New updated code:
|
@steveklabnik's code is no longer valid. |
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 |
Still reproduces. Updated code:
|
Still a duplicate of #9307 - the signatures of at least |
This matches the definition [used in glacier], which includes exit status 101 without an accompanying diagnostic (such as rust-lang/rust#21599), and when rustc is killed by a signal (rust-lang/rust#13368) This also means no processing modes are capturing stdio, but I didn't remove it as it may be desired for the regex features discussed in rust-lang#53 [used in glacier]: https://github.com/rust-lang/glacier/blob/77029d8e7f755bd95913d3c741738674d5ccadc3/src/lib.rs#L51-L56
Last repro above is still valid. Current error message:
|
I don't think there's much point in leaving this open as a duplicate of #9307, so closing in favor of that |
The following code makes rustc core dump. It is hardly a normal use case, but it would be nice if rustc failed more gracefully.
The text was updated successfully, but these errors were encountered: