From patchwork Sun Oct 31 18:53:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Buclaw X-Patchwork-Id: 46874 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4EA68385781F for ; Sun, 31 Oct 2021 18:55:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4EA68385781F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635706508; bh=MYtnxj/8oU1RY32gNxUHwgQ3vc+frvt8M0lAWTeexU4=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=n/sDcT9XsWvK7HNwiK7BSP2SKvdT0Jl04mUmTaDSJ6LBVCa1GvKP6Er+b12zM1CTc d5NpP3tZvYzJNSLKgHNnTRtOvmISYNxkfEZGd8Smk8Q5a/FnwqzPKxr4P67MiVx76o TRFlvZjfp4OHbcIoSKzVgcyF33kpkb9L+p90d3nc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [IPv6:2001:67c:2050::465:102]) by sourceware.org (Postfix) with ESMTPS id 287E93857C50 for ; Sun, 31 Oct 2021 18:53:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 287E93857C50 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4Hj50j4KFmzQjf1; Sun, 31 Oct 2021 19:53:41 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de To: gcc-patches@gcc.gnu.org Subject: [committed] d: Fix regressing test failures on ix86-solaris2.11 Date: Sun, 31 Oct 2021 19:53:36 +0100 Message-Id: <20211031185336.559005-1-ibuclaw@gdcproject.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 924301841 X-Spam-Status: No, score=-15.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Iain Buclaw via Gcc-patches From: Iain Buclaw Reply-To: Iain Buclaw Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "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); }