Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit c81dd60

Browse files
committed
Hack fix for ICE as seen in CI
1 parent 084fb79 commit c81dd60

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

runtime/src/builtins.rs

+18
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,24 @@ pub enum BuiltinFeatureTransition {
123123
},
124124
}
125125

126+
// https://github.com/solana-labs/solana/pull/23233 added `BuiltinFeatureTransition`
127+
// to `Bank` which triggers https://github.com/rust-lang/rust/issues/92987 while
128+
// attempting to resolve `Sync` on `BankRc` in `AccountsBackgroundService::new` ala,
129+
//
130+
// query stack during panic:
131+
// #0 [evaluate_obligation] evaluating trait selection obligation `bank::BankRc: core::marker::Sync`
132+
// #1 [typeck] type-checking `accounts_background_service::<impl at runtime/src/accounts_background_service.rs:358:1: 520:2>::new`
133+
// #2 [typeck_item_bodies] type-checking all item bodies
134+
// #3 [analysis] running analysis passes on this crate
135+
// end of query stack
136+
//
137+
// Yoloing a `Sync` onto it avoids the auto trait evaluation and thus the ICE.
138+
//
139+
// We should remove this when upgrading to Rust 1.60.0, where the bug has been
140+
// fixed by https://github.com/rust-lang/rust/pull/93064
141+
unsafe impl Send for BuiltinFeatureTransition {}
142+
unsafe impl Sync for BuiltinFeatureTransition {}
143+
126144
impl BuiltinFeatureTransition {
127145
pub fn to_action(
128146
&self,

0 commit comments

Comments
 (0)