Skip to content

ci: add linux aarch64 ASAN build and test lanes to PR pipelines - #31699

Open
robobun wants to merge 9 commits into
mainfrom
farm/3977ed4f/linux-arm64-asan-ci
Open

ci: add linux aarch64 ASAN build and test lanes to PR pipelines#31699
robobun wants to merge 9 commits into
mainfrom
farm/3977ed4f/linux-arm64-asan-ci

Fix memory leaks found by LeakSanitizer on the linux aarch64 ASAN lane

b86e116
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jun 2, 2026 in 18m 13s

Code review found 1 important issue

Found 5 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 1
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important src/runtime/server/mod.rs:1742-1747 Stacked Borrows UB: synchronous Self::deinit() through &mut self-derived pointer

Annotations

Check failure on line 1747 in src/runtime/server/mod.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

Stacked Borrows UB: synchronous Self::deinit() through &mut self-derived pointer

The new `vm.is_shutting_down()` branch calls `Self::deinit(std::ptr::from_mut(self))` synchronously from inside `schedule_deinit(&mut self)`, deallocating the server's heap block while `&mut self` is still a protected function argument — UB under Stacked Borrows / Tree Borrows, and a direct violation of `deinit`'s own `# Safety` contract ("no other reference may be live") and the `borrow = ptr` rule in `src/CLAUDE.md`. This same PR's `Watcher::thread_main` carefully avoids exactly this pattern (