public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/44107] gcc emits frame (epilogue) info incompatible with the darwin {8,9}-unwinder,10-compacter Date: Sun, 21 Mar 2021 23:52:10 +0000 [thread overview] Message-ID: <bug-44107-4-P1L8Mn4zxL@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-44107-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44107 --- Comment #35 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Iain D Sandoe <iains@gcc.gnu.org>: https://gcc.gnu.org/g:c3d51b2d2382d44b0463b7ebaf12f3b788c9027e commit r10-9502-gc3d51b2d2382d44b0463b7ebaf12f3b788c9027e Author: Iain Sandoe <iain@sandoe.co.uk> Date: Mon Jan 18 20:09:10 2021 +0000 dwarf2unwind : Force the CFA after remember/restore pairs [44107/48097]. This address one of the more long-standing and serious regressions for Darwin. GCC emits unwind code by default on the assumption that the unwinder will be (of have the same capability) as the one in the current libgcc_s. For Darwin platforms, this is not the case - some of them are based on the libgcc_s from GCC-4.2.1 and some are using the unwinder provided by libunwind (part of the LLVM project). The latter implementation has gradually adopted a section that deals with GNU unwind. The most serious problem for some of the platform versions is in handling DW_CFA_remember/restore_state pairs. The DWARF description talks about these in terms of saving/restoring register rows; this is what GCC originally did (and is what the unwinders do for the Darwin versions based on libgcc_s). However, in r118068, this was changed so that not only the registers but also the current frame address expression were saved. The unwind code assumes that the unwinder will do this; some of Darwin's unwinders do not, leading to lockups etc. To date, the only solution has been to replace the system libgcc_s with a newer one which is not a viable solution for many end-users (since that means overwritting the one provided with the system installation). The fix here provides a target hook that allows the target to specify that the CFA should be reinstated after a DW_CFA_restore. This fixes the issue (and also the closed WONTFIX of 44107). (As a matter of record, it also fixes reported Java issues if backported to GCC-5). gcc/ChangeLog: PR target/44107 PR target/48097 * config/darwin-protos.h (darwin_should_restore_cfa_state): New. * config/darwin.c (darwin_should_restore_cfa_state): New. * config/darwin.h (TARGET_ASM_SHOULD_RESTORE_CFA_STATE): New. * doc/tm.texi: Regenerated. * doc/tm.texi.in: Document TARGET_ASM_SHOULD_RESTORE_CFA_STATE. * dwarf2cfi.c (connect_traces): If the target requests, restore the CFA expression after a DW_CFA_restore. * target.def (TARGET_ASM_SHOULD_RESTORE_CFA_STATE): New hook. (cherry picked from commit 491d5b3cf8216f9285a67aa213b9a66b0035137b)
next prev parent reply other threads:[~2021-03-21 23:52 UTC|newest] Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-44107-4@http.gcc.gnu.org/bugzilla/> 2011-03-19 11:42 ` [Bug bootstrap/44107] libstdc++ (dylib) is built with an erroneous dependency towards /usr/lib Denis.Excoffier at airbus dot com 2011-03-19 11:42 ` mikestump at comcast dot net 2011-03-19 15:03 ` iains at gcc dot gnu.org 2011-03-19 15:13 ` iains at gcc dot gnu.org 2011-03-19 23:26 ` howarth at nitro dot med.uc.edu 2011-03-20 12:43 ` Denis.Excoffier at airbus dot com 2011-03-20 14:50 ` iains at gcc dot gnu.org 2011-03-20 14:52 ` howarth at nitro dot med.uc.edu 2011-03-20 21:10 ` Denis.Excoffier at airbus dot com 2011-03-20 21:27 ` iains at gcc dot gnu.org 2011-03-20 21:50 ` iains at gcc dot gnu.org 2011-03-21 8:18 ` Denis.Excoffier at airbus dot com 2011-03-21 8:34 ` iains at gcc dot gnu.org 2011-03-21 19:30 ` mikestump at comcast dot net 2011-04-28 16:28 ` rguenth at gcc dot gnu.org 2011-06-26 17:38 ` [Bug target/44107] gcc emits frame (epilogue) info incompatible with the darwin {8,9}-unwinder,10-compacter iains at gcc dot gnu.org 2011-12-11 19:53 ` gcc@Denis-Excoffier.org 2011-12-11 20:04 ` iains at gcc dot gnu.org 2013-07-16 13:02 ` iains at gcc dot gnu.org 2013-07-16 16:16 ` howarth at nitro dot med.uc.edu 2013-09-09 13:56 ` dominiq at lps dot ens.fr 2013-09-09 19:57 ` fang at csl dot cornell.edu 2013-09-09 21:46 ` mrs at gcc dot gnu.org 2013-09-10 13:57 ` howarth at nitro dot med.uc.edu 2013-09-14 11:58 ` iains at gcc dot gnu.org 2013-09-14 12:01 ` iains at gcc dot gnu.org 2014-01-22 7:58 ` gcc@Denis-Excoffier.org 2014-01-22 8:13 ` iains at gcc dot gnu.org 2014-01-22 8:58 ` gcc@Denis-Excoffier.org 2014-01-22 19:49 ` iains at gcc dot gnu.org 2014-11-03 19:44 ` fxcoudert at gcc dot gnu.org 2014-11-03 19:49 ` gcc@Denis-Excoffier.org 2021-02-28 15:36 ` egallager at gcc dot gnu.org 2021-03-01 19:37 ` cvs-commit at gcc dot gnu.org 2021-03-21 23:52 ` cvs-commit at gcc dot gnu.org [this message] 2021-05-01 13:08 ` cvs-commit at gcc dot gnu.org 2023-05-16 19:14 ` iains at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-44107-4-P1L8Mn4zxL@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).