From: Jakub Jelinek Date: Sat, 1 Dec 2018 07:31:56 +0000 (+0100) Subject: re PR sanitizer/88289 (r266664 causes asan to fail on many/most tests on BE) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a5b256615869279b3ec54ee3f58811689a26526c;p=gcc.git re PR sanitizer/88289 (r266664 causes asan to fail on many/most tests on BE) PR sanitizer/88289 * asan.c (asan_redzone_buffer::flush_redzone_payload): Fix up an off-by-one for BYTES_BIG_ENDIAN. From-SVN: r266708 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b215a9c6357..c84d6fa5c25 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2018-12-01 Jakub Jelinek + PR sanitizer/88289 + * asan.c (asan_redzone_buffer::flush_redzone_payload): Fix up + an off-by-one for BYTES_BIG_ENDIAN. + PR target/54589 * combine.c (find_split_point): For invalid memory address nonobj + obj + const, if reg + obj + const is valid addressing diff --git a/gcc/asan.c b/gcc/asan.c index 5d1d1dec064..0530ddd0056 100644 --- a/gcc/asan.c +++ b/gcc/asan.c @@ -1326,7 +1326,7 @@ asan_redzone_buffer::flush_redzone_payload (void) for (unsigned i = 0; i < RZ_BUFFER_SIZE; i++) { unsigned char v - = m_shadow_bytes[BYTES_BIG_ENDIAN ? RZ_BUFFER_SIZE - i : i]; + = m_shadow_bytes[BYTES_BIG_ENDIAN ? RZ_BUFFER_SIZE - i - 1 : i]; val |= (unsigned HOST_WIDE_INT)v << (BITS_PER_UNIT * i); if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, "%02x ", v);