aboutsummaryrefslogtreecommitdiff
path: root/libphobos/libdruntime
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2021-10-31 18:07:16 +0100
committerIain Buclaw <ibuclaw@gdcproject.org>2021-10-31 18:33:30 +0100
commitd41092ec52f46d2f4b08fff8d1519e50354331b0 (patch)
treeacc4346ef0d4904fcf5d6131d7f23adb9667e2e0 /libphobos/libdruntime
parent1b5f73858412731bb2e821bdf0fc85d6cc012d33 (diff)
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.
Diffstat (limited to 'libphobos/libdruntime')
-rw-r--r--libphobos/libdruntime/gcc/deh.d2
1 files changed, 1 insertions, 1 deletions
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);
}