Re: [PATCH] gimple-fold: Fix buffer overflow in fold_array_ctor_reference [PR93454]

2020-01-27 Thread Jeff Law
On Tue, 2020-01-28 at 00:33 +0100, Jakub Jelinek wrote: > Hi! > > libgcrypt FAILs to build on aarch64-linux with > *** stack smashing detected ***: terminated > when gcc is compiled with -D_FORTIFY_SOURCE=2. The problem is if > fold_array_ctor_reference is called with size equal to or very close

[PATCH] gimple-fold: Fix buffer overflow in fold_array_ctor_reference [PR93454]

2020-01-27 Thread Jakub Jelinek
Hi! libgcrypt FAILs to build on aarch64-linux with *** stack smashing detected ***: terminated when gcc is compiled with -D_FORTIFY_SOURCE=2. The problem is if fold_array_ctor_reference is called with size equal to or very close to MAX_BITSIZE_MODE_ANY_MODE bits and non-zero inner_offset. The fir