Conversation
Technically, we weren't actually doing this the way C wants us to, legally. The zmemcpy's turn into NOPs for pretty much all > 0 optimization levels and this gets us defined behavior with the sanitizer, putting the optimized load by arbitrary alignment into the compiler's hands instead of ours.
Codecov Report
@@ Coverage Diff @@
## develop #1194 +/- ##
========================================
Coverage 87.05% 87.06%
========================================
Files 113 113
Lines 9686 9692 +6
Branches 2462 2462
========================================
+ Hits 8432 8438 +6
- Misses 1008 1009 +1
+ Partials 246 245 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
nmoinvaz
left a comment
There was a problem hiding this comment.
Only suggestion is to use a different variable name than tmp. At work we try to not name any variables temp.
Maybe call it set1 or broadcast or repeat..
Other than that it looks good.
|
I was just going on the precedent set by the power8 and aarch64 ones that did the same thing. |
|
Ah if they do the same then it can wait for another commit if we want to clean it all up later on. Anyways, I have already reviewed it and marked it approved. Good find. |
Changes since 2.0.6: - Fix CVE-2022-37434 #1328 - Fix chunkmemset #1196 - Fix deflateBound too small #1236 - Fix Z_SOLO #1263 - Fix ACLE variant of crc32 #1274 - Fix inflateBack #1311 - Fix deflate_quick windowsize #1431 - Fix DFLTCC bugs related to adler32 #1349 and #1390 - Fix warnings #1194 #1312 #1362 - MacOS build fix #1198 - Add invalid windowBits handling #1293 - Support for Force TZCNT #1186 - Support for aligned_alloc() #1360 - Minideflate improvements #1175 #1238 - Dont use unaligned access for memcpy #1309 - Build system #1209 #1233 #1267 #1273 #1278 #1292 #1316 #1318 #1365 - Test improvements #1208 #1227 #1241 #1353 - Cleanup #1266 - Documentation #1205 #1359 - Misc improvements #1294 #1297 #1306 #1344 #1348 - Backported zlib fixes - Backported CI workflows from Develop branch
Changes since 2.0.6: - Fix CVE-2022-37434 #1328 - Fix chunkmemset #1196 - Fix deflateBound too small #1236 - Fix Z_SOLO #1263 - Fix ACLE variant of crc32 #1274 - Fix inflateBack #1311 - Fix deflate_quick windowsize #1431 - Fix DFLTCC bugs related to adler32 #1349 and #1390 - Fix warnings #1194 #1312 #1362 - MacOS build fix #1198 - Add invalid windowBits handling #1293 - Support for Force TZCNT #1186 - Support for aligned_alloc() #1360 - Minideflate improvements #1175 #1238 - Dont use unaligned access for memcpy #1309 - Build system #1209 #1233 #1267 #1273 #1278 #1292 #1316 #1318 #1365 - Test improvements #1208 #1227 #1241 #1353 - Cleanup #1266 - Documentation #1205 #1359 - Misc improvements #1294 #1297 #1306 #1344 #1348 - Backported zlib fixes - Backported CI workflows from Develop branch
Technically, we weren't actually doing this the way C wants us to,
legally. The zmemcpy's turn into NOPs for pretty much all > 0
optimization levels and this gets us defined behavior with the
sanitizer, putting the optimized load by arbitrary alignment into the
compiler's hands instead of ours.