terminal: disable integrity checks under Valgrind
parent
fec0defd04
commit
4fa7b412d4
|
|
@ -1078,3 +1078,4 @@ jobs:
|
|||
- name: valgrind
|
||||
run: |
|
||||
nix develop -c zig build test-valgrind -Dtest-filter="OSC"
|
||||
nix develop -c zig build test-valgrind -Dtest-filter="Parser"
|
||||
|
|
|
|||
|
|
@ -233,6 +233,11 @@ pub fn deinit(self: *Screen) void {
|
|||
/// ensure they're also calling page integrity checks if necessary.
|
||||
pub fn assertIntegrity(self: *const Screen) void {
|
||||
if (build_config.slow_runtime_safety) {
|
||||
// We don't run integrity checks on Valgrind because its soooooo slow,
|
||||
// Valgrind is our integrity checker, and we run these during unit
|
||||
// tests (non-Valgrind) anyways so we're verifying anyways.
|
||||
if (std.valgrind.runningOnValgrind() > 0) return;
|
||||
|
||||
assert(self.cursor.x < self.pages.cols);
|
||||
assert(self.cursor.y < self.pages.rows);
|
||||
|
||||
|
|
|
|||
|
|
@ -346,6 +346,11 @@ pub const Page = struct {
|
|||
// used for the same reason as styles above.
|
||||
//
|
||||
|
||||
// We don't run integrity checks on Valgrind because its soooooo slow,
|
||||
// Valgrind is our integrity checker, and we run these during unit
|
||||
// tests (non-Valgrind) anyways so we're verifying anyways.
|
||||
if (std.valgrind.runningOnValgrind() > 0) return;
|
||||
|
||||
if (build_config.slow_runtime_safety) {
|
||||
if (self.pause_integrity_checks > 0) return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -454,6 +454,11 @@ const SlidingWindow = struct {
|
|||
fn assertIntegrity(self: *const SlidingWindow) void {
|
||||
if (comptime !std.debug.runtime_safety) return;
|
||||
|
||||
// We don't run integrity checks on Valgrind because its soooooo slow,
|
||||
// Valgrind is our integrity checker, and we run these during unit
|
||||
// tests (non-Valgrind) anyways so we're verifying anyways.
|
||||
if (std.valgrind.runningOnValgrind() > 0) return;
|
||||
|
||||
// Integrity check: verify our data matches our metadata exactly.
|
||||
var meta_it = self.meta.iterator(.forward);
|
||||
var data_len: usize = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue