]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
d: Fix regressing test failures on ix86-solaris2.11
authorIain Buclaw <ibuclaw@gdcproject.org>
Sun, 31 Oct 2021 17:07:16 +0000 (18:07 +0100)
committerIain Buclaw <ibuclaw@gdcproject.org>
Sun, 31 Oct 2021 17:33:30 +0000 (18:33 +0100)
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

index ba57fed38dcb8e28d69ff2b310c74075eef768e8..bbc351c7805350c5d285228c86998ab8d31a139d 100644 (file)
@@ -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);
     }