mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
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
This commit is contained in:
parent
afa0834195
commit
33428fc6aa
@ -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)))
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user