• Michael Munday's avatar
    hash/crc32: fix optimized s390x implementation · 4b17b152
    Michael Munday authored
    The code wasn't checking to see if the data was still >= 64 bytes
    long after aligning it.
    
    Aligning the data is an optimization and we don't actually need
    to do it. In fact for smaller sizes it slows things down due to
    the overhead of calling the generic function. Therefore for now
    I have simply removed the alignment stage. I have also added a
    check into the assembly to deliberately trigger a segmentation
    fault if the data is too short.
    
    Fixes #16779.
    
    Change-Id: Ic01636d775efc5ec97689f050991cee04ce8fe73
    Reviewed-on: https://go-review.googlesource.com/27409Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    4b17b152
Name
Last commit
Last update
..
crc32.go Loading commit data...
crc32_amd64.go Loading commit data...
crc32_amd64.s Loading commit data...
crc32_amd64p32.go Loading commit data...
crc32_amd64p32.s Loading commit data...
crc32_generic.go Loading commit data...
crc32_s390x.go Loading commit data...
crc32_s390x.s Loading commit data...
crc32_test.go Loading commit data...
example_test.go Loading commit data...