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: triggered when initializing an empty ParseSess #138990

Closed
KittyBorgX opened this issue Mar 26, 2025 · 1 comment
Closed

ICE: triggered when initializing an empty ParseSess #138990

KittyBorgX opened this issue Mar 26, 2025 · 1 comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-internal-features This issue requires the use of internal features. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@KittyBorgX
Copy link
Member

Code

#![feature(rustc_private)]

extern crate rustc_session;
extern crate rustc_driver;
fn main() {
    let parse_sess = rustc_session::parse::ParseSess::new(vec![]);
}

Meta

rustc --version --verbose:

rustc 1.87.0-nightly (43f0014ef 2025-03-25)
binary: rustc
commit-hash: 43f0014ef0f242418674f49052ed39b70f73bc1c
commit-date: 2025-03-25
host: aarch64-apple-darwin
release: 1.87.0-nightly
LLVM version: 20.1.1

Error output

thread 'main' panicked at /rust/deps/scoped-tls-1.0.1/src/lib.rs:168:9:
cannot access a scoped thread local variable without calling `set` first
Backtrace

thread 'main' panicked at /rust/deps/scoped-tls-1.0.1/src/lib.rs:168:9:
cannot access a scoped thread local variable without calling `set` first
stack backtrace:
   0: std::panicking::begin_panic
   1: <rustc_session::parse::ParseSess>::with_dcx
   2: <rustc_session::parse::ParseSess>::new
   3: testcrash::main
             at ./src/main.rs:6:22
   4: core::ops::function::FnOnce::call_once
             at /Users/me/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5

@KittyBorgX KittyBorgX added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 26, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 26, 2025
@Urgau
Copy link
Member

Urgau commented Mar 26, 2025

Feel free to fix it, but we do not track ICE/mis-use of internal API.

@Urgau Urgau closed this as not planned Won't fix, can't repro, duplicate, stale Mar 26, 2025
@fmease fmease added requires-internal-features This issue requires the use of internal features. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-internal-features This issue requires the use of internal features. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants