diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 61d0cde42..021fa3b32 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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" diff --git a/src/terminal/Screen.zig b/src/terminal/Screen.zig index 079df37db..67769923f 100644 --- a/src/terminal/Screen.zig +++ b/src/terminal/Screen.zig @@ -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); diff --git a/src/terminal/page.zig b/src/terminal/page.zig index 2a631ac78..292707263 100644 --- a/src/terminal/page.zig +++ b/src/terminal/page.zig @@ -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; } diff --git a/src/terminal/search.zig b/src/terminal/search.zig index 2f87f894b..b3c6494a3 100644 --- a/src/terminal/search.zig +++ b/src/terminal/search.zig @@ -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;