From 33428fc6aaf40ac19051df3a6669561c84e9faf6 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 21 Mar 2024 14:35:37 -0700 Subject: [PATCH] std.mem.indexOfScalarPos: valgrind integration this code returns false positives in Valgrind, so we fall back to the other implementation when running in valgrind. see #17717 --- lib/std/mem.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/std/mem.zig b/lib/std/mem.zig index eb3937034625c3b83a83571f767352bc07cd5635..3f24091946f8abe7613764ad3a0f2c14e70b1cad 100644 --- a/lib/std/mem.zig +++ b/lib/std/mem.zig @@ -1187,6 +1187,7 @@ pub fn indexOfScalarPos(comptime T: type, slice: []const T, start_index: usize, var i: usize = start_index; if (backend_supports_vectors and + !std.debug.inValgrind() and // https://github.com/ziglang/zig/issues/17717 !@inComptime() and (@typeInfo(T) == .Int or @typeInfo(T) == .Float) and std.math.isPowerOfTwo(@bitSizeOf(T))) { -- 2.54.0