From 8ebf7e4466c329e7ebd51412e8b75630555d2615 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 1 Jul 2026 12:58:51 +0000 Subject: [PATCH] fix(ci): force tarpaulin LLVM engine to end the coverage segfault MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `rust-ci / Coverage (tarpaulin + codecov)` job has failed on every recent PR (#161/#162) with "Failed to run tests: A segfault occurred while executing tests" — cargo-tarpaulin's default ptrace engine segfaulting while instrumenting the property-test binary on the CI runners. It is a tarpaulin instrumentation flake, not a real failure: the suite passes under `cargo test`, and the ptrace engine does not even reproduce the segfault locally. Add tarpaulin.toml selecting the LLVM (source-based) engine, which avoids ptrace entirely. The standards rust-ci reusable runs `cargo tarpaulin --out Xml`, which reads this [default] profile — so no reusable change is needed. Verified locally: with this config, `cargo tarpaulin --out Xml` activates LLVM_PROFILE_FILE coverage (26 profiled test binaries), exits 0, and writes a valid cobertura.xml. (The engine value must be capitalized "Llvm" — serde is case-sensitive; lowercase silently falls back to ptrace.) Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_0172RBMz3qYjb1ttzD2i7RNh --- tarpaulin.toml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tarpaulin.toml diff --git a/tarpaulin.toml b/tarpaulin.toml new file mode 100644 index 0000000..8236c49 --- /dev/null +++ b/tarpaulin.toml @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: MPL-2.0 +# cargo-tarpaulin configuration. +# +# Force the LLVM (source-based) coverage engine. The default ptrace engine +# segfaults on the CI runners while instrumenting the property-test binary +# ("Failed to run tests: A segfault occurred while executing tests") — a known +# cargo-tarpaulin ptrace flake, not a real test failure (the suite passes under +# `cargo test`, and the ptrace engine does not even reproduce the segfault +# locally). The LLVM engine avoids ptrace entirely. +# +# The standards rust-ci reusable runs `cargo tarpaulin --out Xml`, which reads +# this [default] profile, so the engine switch needs no reusable change. Verified +# locally: `cargo tarpaulin --out Xml` then activates LLVM_PROFILE_FILE coverage +# and produces cobertura.xml cleanly (exit 0). +[default] +engine = "Llvm"