From eb7c3616b811f175fee41c80fd0e8549bb80635c Mon Sep 17 00:00:00 2001 From: FuzzTest Team Date: Wed, 25 Mar 2026 21:02:08 -0700 Subject: [PATCH] Fix GetRandomSide always returning left GetRandomSide uses `RandomBool` to branch, but in the else block it returns `entry.lhs` again instead of `entry.rhs`. This causes it to completely blind the fuzzer to constants found on the right-hand-side of comparisons. Fix it to correctly use `rhs` when returning the other side. PiperOrigin-RevId: 889588583 --- fuzztest/internal/table_of_recent_compares.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fuzztest/internal/table_of_recent_compares.h b/fuzztest/internal/table_of_recent_compares.h index 742bf55e..2f612897 100644 --- a/fuzztest/internal/table_of_recent_compares.h +++ b/fuzztest/internal/table_of_recent_compares.h @@ -196,7 +196,7 @@ class TableOfRecentCompares { result = val; } } else { - ValueType val = static_cast(entry.lhs); + ValueType val = static_cast(entry.rhs); if (min <= val && val <= max) { result = val; }