From: Iain Buclaw Date: Sun, 31 Oct 2021 17:07:16 +0000 (+0100) Subject: d: Fix regressing test failures on ix86-solaris2.11 X-Git-Tag: basepoints/gcc-13~3500 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d41092ec52f46d2f4b08fff8d1519e50354331b0;p=thirdparty%2Fgcc.git d: Fix regressing test failures on ix86-solaris2.11 The _Unwind_Exception struct had its alignment adjusted to 16-bytes, however malloc() on Solaris X86 is not guaranteed to allocate memory aligned to 16-bytes as well. PR d/102837 libphobos/ChangeLog: * libdruntime/gcc/deh.d (ExceptionHeader.free): Use memset to reset contents of internal EH storage. --- diff --git a/libphobos/libdruntime/gcc/deh.d b/libphobos/libdruntime/gcc/deh.d index ba57fed38dcb..bbc351c78053 100644 --- a/libphobos/libdruntime/gcc/deh.d +++ b/libphobos/libdruntime/gcc/deh.d @@ -207,7 +207,7 @@ struct ExceptionHeader */ static void free(ExceptionHeader* eh) @nogc { - *eh = ExceptionHeader.init; + __builtin_memset(eh, 0, ExceptionHeader.sizeof); if (eh != &ehstorage) __builtin_free(eh); }