ARROW-18141: [C++][Parquet] Avoid UB on unaligned load
Some gcc versions (such as 6.3.0) may emit an aligned-only load instruction, but the Parquet writer can be called with unaligned buffers.
The fix should probably be made in encoders as well (the various Put and PutSpaced methods).
https://issues.apache.org/jira/browse/ARROW-18141
:warning: Ticket has not been started in JIRA, please click 'Start Progress'.
More generally, is there a way we can flush out these issues more systematically? For instance, running tests under an allocator which intentionally returns unaligned buffers?
That's a rather good idea. I'll look into this.
- Closes: #33336
Filed #33933
The failures here appear to be caused by #33939 i'll wait until that is addressed and we get a clean CI before I merge this.
@zeroshade time to give this another shot?
failures don't appear to be related to this change. @lidavidm you agree/objection to me merging?
I just kicked the jobs to be sure, but otherwise let's merge
Benchmark runs are scheduled for baseline = c08888711e72312b149bd12461a0d9f0251afe3b and contender = 3819d85eb3b836b11b82ea4e19285e63e1aa46ed. 3819d85eb3b836b11b82ea4e19285e63e1aa46ed is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished :arrow_down:0.0% :arrow_up:0.0%] ec2-t3-xlarge-us-east-2
[Failed :arrow_down:0.36% :arrow_up:0.03%] test-mac-arm
[Failed :arrow_down:0.46% :arrow_up:0.0%] ursa-i9-9960x
[Finished :arrow_down:0.67% :arrow_up:0.0%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 3819d85e ec2-t3-xlarge-us-east-2
[Failed] 3819d85e test-mac-arm
[Failed] 3819d85e ursa-i9-9960x
[Finished] 3819d85e ursa-thinkcentre-m75q
[Finished] c0888871 ec2-t3-xlarge-us-east-2
[Failed] c0888871 test-mac-arm
[Failed] c0888871 ursa-i9-9960x
[Finished] c0888871 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java