From 513fc52eb360b46c0060b03a8b521a4471367824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ralph=20K=C3=BCpper?= Date: Wed, 2 Sep 2026 19:37:59 +0000 Subject: [PATCH 1/3] test: link callback deopt fixture against shipped runtime --- .../versioned_indexed_loop_callback_deopt.rs | 36 ++++++++++++------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/crates/perry/tests/versioned_indexed_loop_callback_deopt.rs b/crates/perry/tests/versioned_indexed_loop_callback_deopt.rs index 647ca7f7d2..c86a97d963 100644 --- a/crates/perry/tests/versioned_indexed_loop_callback_deopt.rs +++ b/crates/perry/tests/versioned_indexed_loop_callback_deopt.rs @@ -41,15 +41,34 @@ fn workspace_root() -> PathBuf { .expect("canonicalize workspace root") } +/// Perry ships a `panic=abort` runtime. A debug `panic=unwind` archive plants +/// abort-on-unwind guards in `extern "C"` helpers, so the raw JS exceptions in +/// this fixture cannot reach their generated catch landing pads on Linux. +fn target_runtime_dir() -> PathBuf { + let target = std::env::var_os("CARGO_TARGET_DIR") + .map(PathBuf::from) + .unwrap_or_else(|| workspace_root().join("target")); + if cfg!(windows) { + target.join("x86_64-pc-windows-msvc").join("release") + } else { + target.join("release") + } +} + fn runtime_dir() -> PathBuf { static BUILD_RUNTIME: Once = Once::new(); BUILD_RUNTIME.call_once(|| { let cargo = std::env::var_os("CARGO").unwrap_or_else(|| "cargo".into()); let mut command = Command::new(cargo); - command.current_dir(workspace_root()).arg("build"); + command + .current_dir(workspace_root()) + .arg("build") + // `panic` is profile-level; this must match `target_runtime_dir()` + // and the runtime Perry actually ships. + .arg("--release"); remove_gc_env_overrides(&mut command); - if !cfg!(debug_assertions) { - command.arg("--release"); + if cfg!(windows) { + command.arg("--target").arg("x86_64-pc-windows-msvc"); } let build = command .args(["-p", "perry-runtime-static"]) @@ -63,10 +82,7 @@ fn runtime_dir() -> PathBuf { ); }); - perry_bin() - .parent() - .expect("Perry binary directory") - .to_path_buf() + target_runtime_dir() } fn run_fixture(binary: &Path, force_evacuation: bool) -> Output { @@ -93,12 +109,6 @@ fn llvm_function_body(ir: &str, symbol: &str) -> String { } #[test] -// #9482: aborts on Linux with `panic in a function that cannot unwind` inside -// the force_evacuation=false GC fixture — consistent there, never observed -// green; passes 3/3 on macOS at the same pin. Deferred to unblock releases, -// NOT shown pre-existing; the diagnosis and Linux repro live in #9482, and -// re-enabling is deleting this attribute. -#[cfg_attr(target_os = "linux", ignore = "#9482: Linux-only GC deopt abort")] fn cold_callback_arms_resume_once_at_the_next_index() { let dir = tempfile::tempdir().expect("tempdir"); let entry = dir.path().join("main.ts"); From 2dfffee850da1d14b492682acb80b6561f2d144c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ralph=20K=C3=BCpper?= Date: Wed, 2 Sep 2026 19:40:45 +0000 Subject: [PATCH 2/3] docs(changelog): record Linux callback deopt coverage --- changelog.d/9566-linux-callback-deopt-runtime.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/9566-linux-callback-deopt-runtime.md diff --git a/changelog.d/9566-linux-callback-deopt-runtime.md b/changelog.d/9566-linux-callback-deopt-runtime.md new file mode 100644 index 0000000000..8a09b8dec5 --- /dev/null +++ b/changelog.d/9566-linux-callback-deopt-runtime.md @@ -0,0 +1 @@ +test: the versioned indexed-loop callback-deopt fixture now links Perry's shipped `panic=abort` runtime, so its ordinary and forced-evacuation GC paths run on Linux again instead of aborting behind an ignore (#9482). From b39fcb42c794801b390156173e1169f9c37c4469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ralph=20K=C3=BCpper?= Date: Wed, 2 Sep 2026 19:57:35 +0000 Subject: [PATCH 3/3] test: resolve relative Cargo target dirs from workspace --- .../tests/versioned_indexed_loop_callback_deopt.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/perry/tests/versioned_indexed_loop_callback_deopt.rs b/crates/perry/tests/versioned_indexed_loop_callback_deopt.rs index c86a97d963..971748e914 100644 --- a/crates/perry/tests/versioned_indexed_loop_callback_deopt.rs +++ b/crates/perry/tests/versioned_indexed_loop_callback_deopt.rs @@ -44,10 +44,16 @@ fn workspace_root() -> PathBuf { /// Perry ships a `panic=abort` runtime. A debug `panic=unwind` archive plants /// abort-on-unwind guards in `extern "C"` helpers, so the raw JS exceptions in /// this fixture cannot reach their generated catch landing pads on Linux. +/// Relative Cargo target overrides are rooted at the nested build's workspace. fn target_runtime_dir() -> PathBuf { - let target = std::env::var_os("CARGO_TARGET_DIR") + let target = match std::env::var_os("CARGO_TARGET_DIR") + .filter(|value| !value.is_empty()) .map(PathBuf::from) - .unwrap_or_else(|| workspace_root().join("target")); + { + Some(path) if path.is_absolute() => path, + Some(path) => workspace_root().join(path), + None => workspace_root().join("target"), + }; if cfg!(windows) { target.join("x86_64-pc-windows-msvc").join("release") } else {