[zlib] make insert_string_simd load window data with zmemcpy
Undefined behavior santizer (UBSan) notes that window data loaded using the existing code makes C++ compilers unhappy. C++ Compilers expect data alignment: so loading from an unaligned object is undefined C++ behaviour. Fix this: use zmemcpy to load the window data. All optimizing C++ tested (see bug) output the same instruction sequence, before and after this change. So no change in performance. Bug: 1399295 Test: zlib_bench gzip --compression 6 ~/snappy/testdata/* Change-Id: I90cfd66c803686c3834d88c3bc33833216598836 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4086462 Reviewed-by: Adenilson Cavalcanti <cavalcantii@chromium.org> Commit-Queue: Noel Gordon <noel@chromium.org> Cr-Commit-Position: refs/heads/main@{#1080742} NOKEYCHECK=True GitOrigin-RevId: 36bfeb91012cd6c6897eda645e5375abf14c1c01
Loading
Please register or sign in to comment