summaryrefslogtreecommitdiff
path: root/insert_string_tpl.h
diff options
context:
space:
mode:
authorAdam Stylinski <kungfujesus06@gmail.com>2024-12-21 11:04:47 -0500
committerHans Kristian Rosbach <hk-github@circlestorm.org>2024-12-23 14:06:35 +0100
commit06bba674706a238e4b7bee49cf76911851bf8f0c (patch)
tree5fa2c7284b232aa97ee0999f2bf50a696cb59bc0 /insert_string_tpl.h
parent87d8e9540844ff7afd7d466d4e218544578b248b (diff)
downloadProject-Tick-06bba674706a238e4b7bee49cf76911851bf8f0c.tar.gz
Project-Tick-06bba674706a238e4b7bee49cf76911851bf8f0c.zip
Fix unaligned access in ACLE based crc32
This fixes a rightful complaint from the alignment sanitizer that we alias memory in an unaligned fashion. A nice added bonus is that this improves performance a tiny bit on the larger buffers, perhaps due to loops that idiomatically decrement a count and increment a single buffer pointer rather than the maze of conditional pointer reassignments. While here, let's write a unit test just for this. Since this is the only variant that accesses memory in a potentially unaligned fashion that doesn't explicitly go byte by byte or use intrinsics that don't require alignment, we'll enable it only for this function for now. Adding more tests later if need be should be possible. For everything else not crc, we're relying on ubsan to hopefully catch things by chance.
Diffstat (limited to 'insert_string_tpl.h')
0 files changed, 0 insertions, 0 deletions