-
Notifications
You must be signed in to change notification settings - Fork 552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CORE-2459 Fix UBSAN diagnostics #17026
CORE-2459 Fix UBSAN diagnostics #17026
Conversation
new failures in https://buildkite.com/redpanda/redpanda/builds/46094#018e3736-e47b-4595-90ed-3bb04cd35d39:
new failures in https://buildkite.com/redpanda/redpanda/builds/46148#018e3a41-27c6-4a5e-9d91-6f481889ee76:
|
ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/46094#018e3733-3309-45ac-b3f4-4546c2368cfb ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/46458#018e5866-eb81-4a4a-ad0f-bf69fa07bea4 |
/dt |
DT failure seems unrelated
|
a3cf6ae
to
2efe075
Compare
Prevents signed integer overflow in the following expression: `std::max(model::offset(0), offset.dirty_offset - model::offset(10))`
We log the same data in the same function few lines later.
Relevant for the next change which addresses UBSAN diagnostic. The input to the function is an unsigned value. See redpanda-data#14205 (comment) for discussion.
Triggered by `test_cloud_roles_rpunit`: ``` runtime error: 3.67167e+09 is outside the range of representable values of type 'int' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/nv/redpanda/src/v/cloud_roles/refresh_credentials.cc:226:17 in ```
This comparison has richer semantic meaning in this context.
2efe075
to
0cbdb4e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/backport 23.3 |
Oops! Something went wrong. |
/backport 23.2 |
Oops! Something went wrong. |
A couple creeped in because we weren't crashing on UBSAN diagnostics for a while. That is being fixed too in #17027
Backports Required
Release Notes