mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-10-28 18:07:12 +08:00
In P010ToARGBMatrixFilterOverflow, P210ToARGBMatrixFilterOverflow, P010ToAR30MatrixFilterOverflow, and P210ToAR30MatrixFilterOverflow, the tests set src_stride_uv to width (1039) and allocated width * src_uv_height elements. For odd widths, the interleaved UV row requires (width + 1) & ~1 elements (1040). Using width for the stride and buffer size caused the second row to read past the allocated buffer and access uninitialized memory under MSan. Fix this by computing src_stride_uv = (width + 1) & ~1 and sizing the allocated buffer to src_stride_uv * src_uv_height. In TestI400LargeSize, the test attempts large allocations totaling over 10 GB (~2 GB for source and ~8.5 GB for destination). Under MemorySanitizer (MSan), large allocations can exceed shadow memory virtual address limits or assert. Skip this test under MSan by checking __SANITIZE_MEMORY__ and __has_feature(memory_sanitizer). Test: libyuv_unittest --gtest_filter=*FilterOverflow*:*I400Large* Bug: 549112862 Change-Id: I679b7c67d93822e83f066b1895924589fc7242e7 TAG=agy CONV=dd635180-175b-4e35-b7f0-2e38105d3506 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/8269585 Commit-Queue: Frank Barchard <fbarchard@google.com> Reviewed-by: Wan-Teh Chang <wtc@google.com> |
||
|---|---|---|
| .. | ||
| testdata | ||
| basictypes_test.cc | ||
| color_test.cc | ||
| compare_test.cc | ||
| convert_argb_test.cc | ||
| convert_test.cc | ||
| cpu_test.cc | ||
| cpu_thread_test.cc | ||
| math_test.cc | ||
| planar_test.cc | ||
| rotate_argb_test.cc | ||
| rotate_test.cc | ||
| scale_argb_test.cc | ||
| scale_plane_test.cc | ||
| scale_rgb_test.cc | ||
| scale_test.cc | ||
| scale_uv_test.cc | ||
| unit_test.cc | ||
| unit_test.h | ||
| video_common_test.cc | ||