mirror of
https://github.com/meshtastic/firmware.git
synced 2026-10-31 20:40:53 -04:00
The mock routers freed the global crypt lock in their destructors, each with a comment pointing at the reason: Router's constructor asserted the global was null before allocating it, so a suite that built more than one router had to hand it back. That assert is gone - the constructor now reuses an existing lock, the same idiom as routingAuthCacheLock on the next line - and nothing in src/ has ever freed it, so these deletes now free a lock the mock does not own and leave the global null behind them. test_admin_radio is where that bites: ~HamModeMockRouter runs from tearDown, and the next test reaches AdminModule's receive path, which takes LockGuard(cryptLock) - a null dereference now that the Portduino Lock is a real mutex. The other six were the same hazard waiting for a suite to add a test after them. Co-Authored-By: Jonathan Bennett <jbennett@incomsystems.biz> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VeY5PczVYsxWNZhE2Cx4Sv