{"record":{"id":"7f209c16580cb7f9","repo":"embassy-rs/embassy","slug":"interruptexecutor-spawner-called-on-uninitializ","errorCode":null,"errorMessage":"InterruptExecutor::spawner() called on uninitialized executor.","messagePattern":"InterruptExecutor::spawner\\(\\) called on uninitialized executor\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"embassy-executor/src/platform/aarch32.rs","lineNumber":295,"sourceCode":"                (&raw mut (*inner).executor).write(raw::Executor::new(target as *mut ()));\n                &*inner\n            };\n\n            inner.target.enable();\n\n            inner.executor.spawner().make_send()\n        }\n\n        /// Get a SendSpawner for this executor\n        ///\n        /// This returns a [`SendSpawner`](crate::SendSpawner) you can use to spawn tasks on this\n        /// executor.\n        ///\n        /// This MUST only be called on an executor that has already been started.\n        /// The function will panic otherwise.\n        pub fn spawner(&'static self) -> crate::SendSpawner {\n            if !critical_section::with(|cs| self.started.borrow(cs).get()) {\n                panic!(\"InterruptExecutor::spawner() called on uninitialized executor.\");\n            }\n            let inner = unsafe { (&*self.inner.get()).assume_init_ref() };\n            inner.executor.spawner().make_send()\n        }\n    }\n}\n","sourceCodeStart":277,"sourceCodeEnd":302,"githubUrl":"https://github.com/embassy-rs/embassy/blob/463a07b963419a1bfe61d5d597c44acb810afb8b/embassy-executor/src/platform/aarch32.rs#L277-L302","documentation":"Panic from the aarch32 InterruptExecutor::spawner guard: spawner() dereferences executor state that only exists after start() has written it and enabled the SGI. Called before start(), the underlying MaybeUninit slot is uninitialized, so reading it would be undefined behavior; the guard turns that into a deterministic panic. Fires when a task or driver requests a SendSpawner from an executor that was never started, or in the wrong order (spawner() before start() during init).","triggerScenarios":"Thrown at embassy-executor/src/platform/aarch32.rs:295 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure start() is called on the executor before any code obtains its SendSpawner","Get the spawner from inside tasks via Spawner::for_current_executor() rather than holding one from before start","Reorder initialization so executor startup precedes task creation code that uses spawner()","Add an init-order unit test or assertion in board setup to catch the wrong ordering early"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"463a07b963419a1bfe61d5d597c44acb810afb8b","analyzedAt":"2026-09-10T13:38:26.660Z","contentChangedAt":"2026-09-10T13:38:26.660Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}