]> xenbits.xensource.com Git - xtf.git/commit
Work around GCC issue 99578
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 19 May 2021 21:08:59 +0000 (22:08 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 17 Jun 2021 23:08:14 +0000 (00:08 +0100)
commit3e800027016ea4eb19887bf626b46f45fc43fa5d
treef71dff43a96f2f15372ef193f83276ff7a9979ca
parent5ead491e36af6cb8681fc1278bd36c756ad62ac2
Work around GCC issue 99578

GCC 11.1 objects to pointers derived from a constant:

  error: '__builtin_memcpy' offset [0, 7] is out of the bounds [0, 0]  [-Werror=array-bounds]

This is a GCC bug, but work around it rather than turning array-bounds
checking off generally.

Reported-by: Damien Thenot <damien.thenot@vates.fr>
Reported-by: Christopher Clark <christopher.w.clark@gmail.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Tested-by: Christopher Clark <christopher.w.clark@gmail.com>
tests/xsa-170/main.c
tests/xsa-298/main.c