• Hans Wennborg's avatar
    [zlib] Zero-initialize the window used for deflation · 962cbbe8
    Hans Wennborg authored
    Otherwise MSan complains about use-of-uninitialized values in the window.
    This happens in both regular deflate's longest_match and deflate_rle.
    
    Before crrev.com/822755 we used to suppress those reports, but it seems
    better to fix it properly. That will also allow us to catch other
    potential issues with MSan in these functions.
    
    The instances of this that we've seen only reproduce with
    fill_window_sse(), not with the regular fill_window() function. Since
    the former doesn't exist in upstream zlib, I'm not planning to send this
    patch upstream.
    
    Bug: 1137613, 1144420
    Change-Id: I2b1801cd2a63fef48a0072b2d2c8fc1f8a7bb920
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2517520
    Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org>
    Reviewed-by: default avatarAdenilson Cavalcanti <cavalcantii@chromium.org>
    Reviewed-by: default avatarChris Blume <cblume@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#823845}
    962cbbe8
0007-zero-init-deflate-window.patch 1.65 KB