Date: Fri, 22 Apr 2022 00:04:50 +0200 From: =?UTF-8?B?VMSzbA==?= Coosemans <tijl@FreeBSD.org> To: Don Lewis <truckman@FreeBSD.org> Cc: Dimitry Andric <dim@FreeBSD.org>, "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@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: <tkrat.2d3fa41a379082ac@FreeBSD.org> References: <202202101802.21AI2gHO001258@gitrepo.freebsd.org> <tkrat.22179d45b12486db@FreeBSD.org> <B4043509-9F8E-4786-8096-56A0E251818E@FreeBSD.org> <tkrat.263ed6fe64640718@FreeBSD.org> <tkrat.7f32d006c83788f4@FreeBSD.org> <20220421195054.21f5a179@FreeBSD.org> <tkrat.40a06c5f6d7a9408@FreeBSD.org> <tkrat.2d3fa41a379082ac@FreeBSD.org>
index | next in thread | previous in thread | raw e-mail
On Thu, 21 Apr 2022 13:57:09 -0700 (PDT) Don Lewis <truckman@FreeBSD.org> wrote: > On 21 Apr, Don Lewis wrote: >> On 21 Apr, Tijl Coosemans wrote: >>> On Wed, 20 Apr 2022 18:35:15 -0700 (PDT) Don Lewis >>> <truckman@FreeBSD.org> wrote: >>>> 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. >>> >>> 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. >> >> 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. There's a patch for devel/libunwind in bug 263370. > ... 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.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220422000450.071f3c08>
