ORC-1834: [C++] Fix undefined behavior#2112
ORC-1834: [C++] Fix undefined behavior#2112georgthegreat wants to merge 1 commit intoapache:mainfrom
Conversation
|
The form suggest filing a JIRA issue, but
|
|
Thanks for fixing this!
You may request an account at https://selfserve.apache.org/jira-account.html |
|
@wgtmac, I have filed https://issues.apache.org/jira/browse/ORC-1834 |
Unaligned reads are UB in C++, memcpy-ing zero bytes is UB either.
|
Thanks @dongjoon-hyun! The linter CI is green after rebased: https://github.com/apache/orc/actions/runs/12759485419/job/35563347180?pr=2112 |
|
Perhaps we should enable UBSAN together with the ASAN CI. |
|
Shall we backport this bug fix to branch-2.1 ? Or, Apache ORC 2.2 (2026-01-15) is enough for delivery schedule? |
|
For us it would be better to have this backported to 2.1 and have a release tagged. |
|
Got it, @georgthegreat . |
### What changes were proposed in this pull request? Unaligned reads are UB in C++, memcpy-ing zero bytes is UB either. ### How was this patch tested? Internal UBsan report was used to detect and fix this bug. Closes #2112 from georgthegreat/patch-3. Authored-by: Yuriy Chernyshov <thegeorg@yandex-team.com> Signed-off-by: Gang Wu <ustcwg@gmail.com> (cherry picked from commit ab084b5) Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
|
|
|
My bad. I removed it from
In this case, we need a backporting PR. Could you make another PR to branch-2.1, @georgthegreat ? |

What changes were proposed in this pull request?
Unaligned reads are UB in C++, memcpy-ing zero bytes is UB either.
How was this patch tested?
Internal UBsan report was used to detect and fix this bug.