This repository was archived by the owner on Oct 25, 2026. It is now read-only.
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>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four INCREX BYFLOAT overflow tests in
tests/unit/type/incr.tclfail on every Valgrind daily run, and on the 9.2 backport sweep (valkey-io/valkey#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.Based on valkey-io/valkey
unstableatd379883ae, so the base branch here isupstream-unstable-d379883ae.This was generated by AI but verified, with love, by a human.