From nobody Sun Apr 17 15:49:39 2022 X-Original-To: ports-bugs@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 16BB011D5134 for ; Sun, 17 Apr 2022 15:49:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KhDyq5MKdz3thD for ; Sun, 17 Apr 2022 15:49:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9549F20CF2 for ; Sun, 17 Apr 2022 15:49:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 23HFndZb047871 for ; Sun, 17 Apr 2022 15:49:39 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 23HFndVb047870 for ports-bugs@FreeBSD.org; Sun, 17 Apr 2022 15:49:39 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 263370] devel/libunwind: unwind.h incompatible with base unwind.h Date: Sun, 17 Apr 2022 15:49:39 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: tijl@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: sunpoet@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc blocked flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650210579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pV2vRP2W2I9N/Bur78jE1aZjSqE73fiVX3eA2WTixig=; b=uAcrv7aAfrR0ApC4Ms5Q2cfJ6ivf91hkzbikp5pvdawrh2d1xs1VTMyrll4/xq2GoERvke DFId6vVerjl5Pyj7qn5VDOTQvqkiTRk0i3T23i2VvA9B+LMBvEW57qfOi70wcv8GdyGfql qiUW+gX8Vy104rT7Er8YcdjJtL0uIMreY6dg9U7pU+epqIochswLj8lt+btaWS/N3FDz0Y pyoBmY0oRmSBnz55t/kHun+pX/j0lQu/JEIDpKbezcGWHcKlAPvxKmjLAbXnZ3t3n4X1k/ urnqaq5tIDsot05TKv2eUyaf68s1PwA9+SSFAxbN5eXhVTqRDZfrrP4oexsqdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650210579; a=rsa-sha256; cv=none; b=l7E10/m7eBXYlmmobkfH34C/RhHHDTkq2Aw7Pfk69h1Y8pyrpVTe+A7fLeIomLCI+bW5u3 lqW2SKsh22+mduXMLU/ILdwz/xsKSI9uGEuJizlni2B/5qGFNPmkM41ulNPSwM1oVEnBUy GISw8SHz6HDiFHbaHlr283+i58yKogitaP8lfZVvF0d+QpuRZdFaKAHPTcRJRQunmXDjUt xbp2Fya4kjRVzNNfUgN2nTKZkjqMMGPXA3OF3GXkiigSDMR1hO7QHAXIy5nVhBFErjkKo3 xC/+Sv0ZzCfL3TVdKFez3MbmDJWAS/syM9dVjN6EMsMZ2SCRTC9/QYsdNMKxXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263370 Bug ID: 263370 Summary: devel/libunwind: unwind.h incompatible with base unwind.h Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: sunpoet@FreeBSD.org Reporter: tijl@FreeBSD.org CC: brooks@FreeBSD.org, dim@FreeBSD.org, emaste@freebsd.org, jhb@FreeBSD.org, pkubaj@FreeBSD.org, re@FreeBSD.org Blocks: 262008 Flags: maintainer-feedback?(sunpoet@FreeBSD.org) CC: Assignee: sunpoet@FreeBSD.org The base system unwind.h (since base c00d34566536) aligns struct _Unwind_Exception using __attribute__((__aligned__)) which is 16 byte align= ment on i386 and amd64. The unwind.h from devel/libunwind used to have this as = well but replaced it (erroneously) with _Alignas(8) in version 1.6 which is incompatible. This difference affects the layout (size, alignment, padding, field offsets) of struct __cxa_exception in cxxabi.h. By default libreoffice depends on gstreamer which by default depends on devel/libunwind, so with default options libreoffice is built with the wrong _Unwind_Exception and __cxa_exception. This leads to crashes already during build, at least on i386 (gengal.bin segfaults as reported in bug 262008). = For amd64, libreoffice has hacks in place to detect ABI differences at runtime which also happen to work in this case. I suspect the same happens with openoffice. Either devel/libunwind needs a patch that reverts https://github.com/libunwind/libunwind/commit/da8dc856ab5646e04160060aae942= 5db3f5428ce#diff-0b26e6872c56fde17faa6297bdcd1cc72357de35a30894de5d48b4006e= 5fe83a=3D but how does that affect older versions of FreeBSD? Or it could be configu= red with --disable-unwind-header so its unwind.h isn't installed, but then how = does that affect other ports? Additionally, the comments in struct __cxa_exception in cxxabi.h state that _Unwind_Exception is 64-bit aligned and that adding referenceCount at the beginning is safe. This may have been true at the time because LLVM libunw= ind added __attribute__((__aligned__)) later (to be GCC compatible I think: https://github.com/llvm/llvm-project/commit/19f802ff68361af0a28c8ad6e12daf9= bd740b96d), but it's not safe now and the GCC folks were bitten by this as well (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D38732). For architectures = where __attribute__((__aligned__)) means 16 byte alignment adding it to _Unwind_Exception also adds 8 bytes of padding right before the unwindHeader field in __cxa_exception which breaks ABI. That's why libreoffice on amd64= has the hacks I mentioned above. Could we change our libcxxrt similar to what libc++abi did in https://github.com/llvm/llvm-project/commit/f2a436058fcbc11291e73badb44e243= f61046183? I believe that way we maintain ABI compatibility at least on 64-bit architectures, i.e. libreoffice built with FreeBSD 13.0 cxxabi.h and unwind= .h (or devel/libunwind unwind.h with _Alignas(8)) would then run on FreeBSD 13= .1.=20 Can we delay FreeBSD 13.1 release until this is fully understood and sorted out? Referenced Bugs: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262008 [Bug 262008] editors/libreoffice failed to build --=20 You are receiving this mail because: You are the assignee for the bug.=