Repository navigation
Conversation
The four INCREX BYFLOAT arithmetic overflow tests in incr.tcl fail every day in the Valgrind jobs. Valgrind computes x87 long double arithmetic at 64-bit precision, so 1e4932 + 1e4932 is not detected as an overflow: the sum is stored, its TTL is changed, and the reply's delta is nan. The replication.tcl twin of these tests was already tagged valgrind:skip when INCREX was added, as were the neighboring inf/nan INCREX tests in incr.tcl. Tag these four the same way. Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Review stateReady for human review. Risk: Low. Test-only change. The worst case is that the overflow tests no longer run in Valgrind jobs, which already cannot reach the overflow path. Open findings: none. Backport: Needed for 9.2. upstream/9.2 has these four tests in tests/unit/type/incr.tcl without valgrind:skip, so its Valgrind runs fail the same way. INCREX is not on 9.1 or older branches. Updated for 70891a1 at 2026-10-15 22:04 UTC. The bot rewrites this comment on every review. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #4898 +/- ##
============================================
+ Coverage 80.76% 80.83% +0.07%
============================================
Files 195 195
Lines 102234 102234
============================================
+ Hits 82569 82641 +72
+ Misses 19665 19593 -72 🚀 New features to boost your workflow:
|
|
Duplicate of #4850 |
Four INCREX BYFLOAT overflow tests in
tests/unit/type/incr.tclfail on every Valgrind daily run, and on the 9.2 backport sweep (#4884). Valgrind emulates x87long doubleat 64-bit precision, so 1e4932 + 1e4932 never overflows to infinity and the overflow branch never runs. This tags the four testsvalgrind:skip, the same tag theirreplication.tcltwin already got in #3253. Needs backporting to 9.2.AI generated details
Problem
Failing jobs: https://github.com/valkey-io/valkey/actions/runs/38659153622 (
test-valgrind-test (integration-type),test-valgrind-no-malloc-usable-size-test (integration-type)) and https://github.com/valkey-io/valkey/actions/runs/38624991727/job/116062250934. These four are the only[err]lines in those jobs.INCREX was added in 6ae7eb4 (#3253), first released in 9.2.0-rc1.
ldbl_overflow_operand(tests/support/util.tcl:1547) chooses 1e4932 because its probe,increx byfloat 0, still succeeds under Valgrind. The overflow check isisinf(value_ld)atsrc/t_string.c:915. Under Valgrind it is never true. A minimal program built with gcc 13 on Ubuntu 24.04 shows this:The server stores the finite sum, applies the command's TTL, and replies with a
nandelta. The test assertions catch exactly that. Thereplication.tcltestINCREX BYFLOAT arithmetic overflow does not propagateis the same operation, and #3253 already tagged itvalgrind:skipwith a comment explaining why. Theincr.tclcopies did not get the tag.Alternative considered
Have
ldbl_overflow_operanddetect Valgrind and fall back to 1e308. That relies on Valgrind arithmetic matchingdoubleon every Valgrind version. It does not: under Valgrind 3.19 on Amazon Linux 2, 1e4932 is rejected as infinity and the tests pass. The tests would also stop exercising thelong doublerange under Valgrind, so they would test nothing Valgrind can report on. Skipping is the existing convention for this file and the replication test.Testing
Ran in
ubuntu:24.04with Valgrind 3.22 and gcc 13, which matches CI../runtest --single unit/type/incr --valgrind --clients 1on the base fails like CI does:With the patch, the same run reports all four as
[ignore]: ... Not supported when running under Valgrindand passes. Without--valgrind, the same binary passes all four tests.This was generated by AI but verified, with love, by a human.