public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] d: Fix regressing test failures on ix86-solaris2.11
@ 2021-10-31 18:53 Iain Buclaw
  0 siblings, 0 replies; only message in thread
From: Iain Buclaw @ 2021-10-31 18:53 UTC (permalink / raw)
  To: gcc-patches

Hi,

This patch fixes a regression caused by r12-3986.  The _Unwind_Exception
struct had its alignment adjusted to 16-bytes in order to be compatible
with other languages, however malloc() on Solaris X86 is not guaranteed
to allocate memory aligned to 16-bytes as well.

Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, as
well as x86_64-pc-solaris2.11/-m32.  Committed to mainline.

Regards,
Iain

---
	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 ba57fed38dc..bbc351c7805 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.30.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-31 18:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-31 18:53 [committed] d: Fix regressing test failures on ix86-solaris2.11 Iain Buclaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).