[committed] d: Fix regressing test failures on ix86-solaris2.11
Commit Message
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(-)
@@ -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);
}