From d41092ec52f46d2f4b08fff8d1519e50354331b0 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Sun, 31 Oct 2021 18:07:16 +0100 Subject: [PATCH] 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. --- libphobos/libdruntime/gcc/deh.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.47.2