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.
This commit is contained in:
Iain Buclaw 2021-10-31 18:07:16 +01:00
parent 1b5f738584
commit d41092ec52

View 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);
}