a4e5433660
std::hash returns a 64 bit value, which is truncated to a 32 bit value in ComputeHash. ubsan's implicit-unsigned-integer-truncation doesn't like this implicit truncation and crashes the program. Explicitly strip off the top order bits after computing the hash. Remove the windows specific version of the hash computation. The windows compile now uses clang, so this code is obsolete. This also avoids us having to add __attribute__((no_sanitize("integer"))) to the windows code. This is needed to support Android booting with ubsan's implicit-unsigned-integer-truncation option enabled. Test: compiles and boots Bug: 122975762 Change-Id: I2f05fbf5ffee8e90a66a6fda32e80de9cca246c0 |
||
---|---|---|
.. | ||
include/ziparchive | ||
testdata | ||
.clang-format | ||
Android.bp | ||
OWNERS | ||
entry_name_utils-inl.h | ||
entry_name_utils_test.cc | ||
unzip.cpp | ||
zip_archive.cc | ||
zip_archive_benchmark.cpp | ||
zip_archive_common.h | ||
zip_archive_private.h | ||
zip_archive_stream_entry.cc | ||
zip_archive_test.cc | ||
zip_writer.cc | ||
zip_writer_test.cc |