mit einem Klick
debug-with-valgrind
// Debug crashes, segfaults, and memory errors using valgrind integration with nextest through pre-configured profiles
// Debug crashes, segfaults, and memory errors using valgrind integration with nextest through pre-configured profiles
Guidelines 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
| 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.toml