Skip to content

Conversation

@zuiderkwast
Copy link
Contributor

The unit test declared an array of size 1 and used pointers to elements outside the array. This is fine because the pointers are never dereferenced, but undefined-sanitizer complains.

Now, instead allocate a huge array to make sure all pointers into it are valid.

Example failure:

https://github.com/valkey-io/valkey/actions/runs/15175084203/job/42673713108#step:10:123

Signed-off-by: Viktor Söderqvist <[email protected]>
@zuiderkwast zuiderkwast added test-failure An issue indicating a test failure run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) labels May 22, 2025
@codecov
Copy link

codecov bot commented May 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.22%. Comparing base (0012ca7) to head (8a62a29).
Report is 4 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #2126   +/-   ##
=========================================
  Coverage     71.21%   71.22%           
=========================================
  Files           122      122           
  Lines         66046    66046           
=========================================
+ Hits          47034    47039    +5     
+ Misses        19012    19007    -5     

see 10 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zuiderkwast
Copy link
Contributor Author

Daily / test-sanitizer-undefined doesn't seem to run, but I've verified locally with the undefined santitizer.

@zuiderkwast zuiderkwast merged commit db14ac2 into valkey-io:unstable May 23, 2025
47 of 60 checks passed
@zuiderkwast zuiderkwast deleted the ubsan-hashtable-unittest branch May 23, 2025 00:57
@zuiderkwast zuiderkwast mentioned this pull request Jun 5, 2025
@hpatro hpatro added this to Valkey 8.1 Jun 5, 2025
@hpatro hpatro moved this to To be backported in Valkey 8.1 Jun 5, 2025
hpatro pushed a commit to hpatro/valkey that referenced this pull request Jun 5, 2025
The unit test declared an array of size 1 and used pointers to elements
outside the array. This is fine because the pointers are never
dereferenced, but undefined-sanitizer complains.

Now, instead allocate a huge array to make sure all pointers into it are
valid.

Example failure:


https://github.com/valkey-io/valkey/actions/runs/15175084203/job/42673713108#step:10:123

Signed-off-by: Viktor Söderqvist <[email protected]>
hpatro pushed a commit to hpatro/valkey that referenced this pull request Jun 9, 2025
The unit test declared an array of size 1 and used pointers to elements
outside the array. This is fine because the pointers are never
dereferenced, but undefined-sanitizer complains.

Now, instead allocate a huge array to make sure all pointers into it are
valid.

Example failure:


https://github.com/valkey-io/valkey/actions/runs/15175084203/job/42673713108#step:10:123

Signed-off-by: Viktor Söderqvist <[email protected]>
hpatro pushed a commit that referenced this pull request Jun 9, 2025
The unit test declared an array of size 1 and used pointers to elements
outside the array. This is fine because the pointers are never
dereferenced, but undefined-sanitizer complains.

Now, instead allocate a huge array to make sure all pointers into it are
valid.

Example failure:

https://github.com/valkey-io/valkey/actions/runs/15175084203/job/42673713108#step:10:123

Signed-off-by: Viktor Söderqvist <[email protected]>
Signed-off-by: Harkrishn Patro <[email protected]>
hpatro pushed a commit that referenced this pull request Jun 11, 2025
The unit test declared an array of size 1 and used pointers to elements
outside the array. This is fine because the pointers are never
dereferenced, but undefined-sanitizer complains.

Now, instead allocate a huge array to make sure all pointers into it are
valid.

Example failure:

https://github.com/valkey-io/valkey/actions/runs/15175084203/job/42673713108#step:10:123

Signed-off-by: Viktor Söderqvist <[email protected]>
Signed-off-by: Harkrishn Patro <[email protected]>
@hpatro hpatro moved this from To be backported to 8.1.2 in Valkey 8.1 Jun 11, 2025
shanwan1 pushed a commit to shanwan1/valkey that referenced this pull request Jun 13, 2025
The unit test declared an array of size 1 and used pointers to elements
outside the array. This is fine because the pointers are never
dereferenced, but undefined-sanitizer complains.

Now, instead allocate a huge array to make sure all pointers into it are
valid.

Example failure:

https://github.com/valkey-io/valkey/actions/runs/15175084203/job/42673713108#step:10:123

Signed-off-by: Viktor Söderqvist <[email protected]>
Signed-off-by: shanwan1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) test-failure An issue indicating a test failure

Projects

Status: 8.1.2

Development

Successfully merging this pull request may close these issues.

2 participants