Skip to content

Conversation

@xbasel
Copy link
Member

@xbasel xbasel commented Jun 11, 2025

Replaced direct cast to robj** with memcpy to avoid undefined behavior on unaligned buffers, which caused test failure when built with UBSan.

Follow-up of #2078

@xbasel xbasel requested a review from zuiderkwast June 11, 2025 13:19
@xbasel xbasel mentioned this pull request Jun 11, 2025
@xbasel xbasel added the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Jun 11, 2025
@codecov
Copy link

codecov bot commented Jun 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.51%. Comparing base (2019337) to head (3fa3207).
Report is 4 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #2201      +/-   ##
============================================
- Coverage     71.55%   71.51%   -0.04%     
============================================
  Files           122      122              
  Lines         66493    66493              
============================================
- Hits          47579    47553      -26     
- Misses        18914    18940      +26     

see 15 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.

…thOffloadsToList

Replaced direct cast to robj** with memcpy to avoid undefined behavior on
unaligned buffers, which caused test failure when built with UBSan.

Signed-off-by: xbasel <[email protected]>
@zuiderkwast zuiderkwast changed the title test: fix test failure due to misaligned memory access in test_addRepliesWithOffloadsToList test: fix UBSan warning due to misaligned memory access in unit test_addRepliesWithOffloadsToList Jun 16, 2025
@zuiderkwast zuiderkwast merged commit 95b6a32 into valkey-io:unstable Jun 16, 2025
60 of 62 checks passed
ranshid pushed a commit to ranshid/valkey that referenced this pull request Jun 18, 2025
…addRepliesWithOffloadsToList (valkey-io#2201)

Replaced direct cast to robj** with memcpy to avoid undefined behavior
on unaligned buffers, which caused test failure when built with UBSan.

Follow-up of valkey-io#2078

Signed-off-by: xbasel <[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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants