一键导入
debug-with-valgrind
Debug crashes, segfaults, and memory errors using valgrind integration with nextest through pre-configured profiles
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Debug crashes, segfaults, and memory errors using valgrind integration with nextest through pre-configured profiles
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | debug-with-valgrind |
| description | Debug crashes, segfaults, and memory errors using valgrind integration with nextest through pre-configured profiles |
When you encounter crashes, segfaults, or memory errors in tests, use valgrind for proper debugging.
# Run a specific test under valgrind
cargo nextest run --profile valgrind -p PACKAGE --test TEST_FILE TEST_NAME
# Example
cargo nextest run --profile valgrind -p facet-format-json --test jit_deserialize test_jit_option_some
The project has valgrind pre-configured in .config/nextest.toml:
Wrapper script: Defined as [scripts.wrapper.valgrind]
valgrind --leak-check=full --show-leak-kinds=all ...Profile: [profile.valgrind] applies the wrapper to all tests on Linux
Running: Use --profile valgrind flag with nextest
❌ Running valgrind manually: valgrind ./target/debug/deps/test-binary
❌ Using raw --no-run + valgrind commands
❌ Playing hunt-the-segfault without proper tools
✅ Use the pre-configured profile: cargo nextest run --profile valgrind <filters>
✅ Let nextest handle the wrapper script integration
✅ Get clean, actionable valgrind output immediately
cargo nextest run --profile valgrind -p PACKAGE --test FILE TEST_NAME.config/nextest.tomlGuidelines for using facet crates (facet-json, facet-toml, figue) instead of serde-based alternatives for consistent dogfooding
Orientation to facet-format JIT deserialization (tiering, fallbacks, key types/entry points) and where to look when changing or debugging JIT code
Systematic workflow for debugging by reproducing bugs with real data, reducing test cases to minimal examples, and adding regression tests