From nobody Thu Apr 21 22:04:50 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A832D198F76C; Thu, 21 Apr 2022 22:04:54 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kks5y4MXrz4RQ3; Thu, 21 Apr 2022 22:04:54 +0000 (UTC) (envelope-from tijl@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650578694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WwmXqCPIj4OIRxtOOkh0rt+WyT2Mr9ZciZG+9ttFjxY=; b=al7pj17+akLVeNdNrioA0v2560K2z+9FwsT14xBzdACGBkmORqL5zwF5mAS3Bc4wAmK8bb hMu64HZsQQfW+7xMGW4NOGQuna8ogNQqhRp37TzBZAheWxbcqyqd2OT/k/2gWnMVBe6sja 8aVvZSupIsCkIOcclBDiUsO/VOzbM9OMfhzB6zNDJPZ8N8YYvS2DPEn2P0tRmaiNMh9cAk dkp8xKAIMwyb8dlEDVpv6Pw6xPAYeMnRVZXGgl5Tl8T7TMfiHvGp+vmPedRZh/UeBiTSX/ xaheB6QfZrNC+9EPv5DDHRZJ8AzRn2HF+EcdTgbQUq3t18EDazpQExch0fwGBw== Received: from localhost (unknown [IPv6:2a02:a03f:894b:4700:7d6f:d1eb:a817:7918]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: tijl) by smtp.freebsd.org (Postfix) with ESMTPSA id C568D37440; Thu, 21 Apr 2022 22:04:53 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Date: Fri, 22 Apr 2022 00:04:50 +0200 From: =?UTF-8?B?VMSzbA==?= Coosemans To: Don Lewis Cc: Dimitry Andric , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: c00d34566536 - main - Install unwind.h into /usr/include Message-ID: <20220422000450.071f3c08@FreeBSD.org> In-Reply-To: References: <202202101802.21AI2gHO001258@gitrepo.freebsd.org> <20220421195054.21f5a179@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650578694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WwmXqCPIj4OIRxtOOkh0rt+WyT2Mr9ZciZG+9ttFjxY=; b=fcNClRDbexbWQ+HTr8/QX8xJcbUkExF0CmX4MYBWTCpRYB8X3Ll7SyYJXsVoZiLvXRLoUr DNYZAbNZM0cR4KwGcfb2Xw0GVMDMnk2nTLsE0gSUVrrPVZ49ApkLaDN6fjSLX5ZumtqD7Q N4QG/3PrkPs3O2B9MUyH6vQtxcmzJ86mzSKCiAKyVl1FXy/yRinlaYspltnwoF5mYOcvTx t6pkEppu/yk7ZUfIZTaO63Wx2HNzfX20a9LH2VJoB2hp16ddomIJt26fEEMXHMwhEeYS0o /iy/UFZ7By5irfbqWySwrOEvc5oXGkqbTDIz8s6H+EJfFUp2N6k1U0PRobIUvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650578694; a=rsa-sha256; cv=none; b=Y6yoEo6zT96rGEJNv04silpm63+HA4dHkTdRKjsZCu3ORbNo2hEdsCRiqMsvMXILaZij/Z pKDGoBUoNa9ys1ha2pb5Addr3Y3cT7LQmserhY7y344SbNRHWERWNNXW9zKjBpJPZyp/Qd dkQ2lkVY+EmfxWxH6SvYE4L/6KK9qGEq44fAVyQuRZuCix0oy/yJk2ZSurQhgsiFvtDgHq HRQhHB7aQdAM6Y5cR6DfCP60M9H65HKWubB4hKn0rtQl/GIcwdCwqcRqTHbcMPjH7736iN 6sHbJxdnMwvQNw2Px/ACUrKrB0ROWaSBrl2cUL/XA+TrBccTe7EECptg/iWSlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Thu, 21 Apr 2022 13:57:09 -0700 (PDT) Don Lewis wrote: > On 21 Apr, Don Lewis wrote: >> On 21 Apr, T=C4=B3l Coosemans wrote: =20 >>> On Wed, 20 Apr 2022 18:35:15 -0700 (PDT) Don Lewis >>> wrote: =20 >>>> My only remaining question is why the selftest fails before the recent >>>> padding fix. I would expect the tests to pass with the incorrectly >>>> placed padding as long as everything was compiled with the same >>>> structure definition. =20 >>>=20 >>> Are you building with devel/libunwind installed? It installs its own >>> unwind.h which does not have the alignment changes so it does not induce >>> padding in __cxa_exception. So you're not actually compiling with the >>> same structure definition. =20 >>=20 >> Bingo! libunwind is getting pulled in by the gstreamer dependency. Not >> sure how to fix this because some of the other dependencies are not >> getting built with libunwind. =20 There's a patch for devel/libunwind in bug 263370. =20 > ... and in view of the above, why does adding the padding to the system > unwind.h header fix the self test since that will introduce a mismatch? What matters for __cxa_exception are negative offsets from the end of the struct. Adding __aligned__ to _Unwind_Exception induced 8 bytes of padding right before the unwindHeader field in __cxa_exception to make that field 16 byte aligned. That put all the fields above unwindHeader at a different offset from the end. By adding the padding to the beginning unwindHeader is already 16 byte aligned and all the fields are at the same offset again as before.