mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 00:35:10 +00:00
std.mem.indexOfSentinel: 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
33428fc6aa
commit
4dc50151c4
@ -1038,6 +1038,7 @@ pub fn indexOfSentinel(comptime T: type, comptime sentinel: T, p: [*:sentinel]co
|
||||
var i: usize = 0;
|
||||
|
||||
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