public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: brendan@zen.org To: gcc-gnats@gcc.gnu.org Subject: bootstrap/4727: dwarf2 debugging crashes cc1plus building libstdc++ Date: Mon, 29 Oct 2001 03:26:00 -0000 [thread overview] Message-ID: <20011029111742.2333.qmail@sourceware.cygnus.com> (raw) >Number: 4727 >Category: bootstrap >Synopsis: dwarf2 debugging crashes cc1plus building libstdc++ >Confidential: no >Severity: critical >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Mon Oct 29 03:26:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: Brendan Kehoe >Release: CVS tree >Organization: >Environment: >Description: In dwarf2out.c's function add_const_value_attribute, it has /* ??? We really should be using HOST_WIDE_INT throughout. */ if (val < 0 && (long) val == val) add_AT_int (die, DW_AT_const_value, (long) val); else if ((unsigned long) val == (unsigned HOST_WIDE_INT) val) add_AT_unsigned (die, DW_AT_const_value, (unsigned long) val); #if HOST_BITS_PER_LONG * 2 == HOST_BITS_PER_WIDE_INT add_AT_long_long (die, DW_AT_const_value, val >> HOST_BITS_PER_LONG, val); #else abort (); #endif This will call abort() in all cases where long isn't twice the size of an int. Based on the earlier code, I believe this should in fact be wrapped by an `else {}' block. >How-To-Repeat: Configure a build using --with-dwarf2. >Fix: Change to only do add_AT_long_long or abort if we qualify to enter an else{} block. >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: text/plain; name="diffs-dwarf2crash.txt" Content-Disposition: inline; filename="diffs-dwarf2crash.txt" 2001-10-29 Brendan Kehoe <brendan@zen.org> * dwarf2out.c (add_const_value_attribute): This needs to wrap the add_AT_long_long or abort call in else{}. *** dwarf2out.c.~1~ Sun Oct 28 20:19:08 2001 --- dwarf2out.c Mon Oct 29 11:06:25 2001 *************** add_const_value_attribute (die, rtl) *** 8378,8387 **** else if ((unsigned long) val == (unsigned HOST_WIDE_INT) val) add_AT_unsigned (die, DW_AT_const_value, (unsigned long) val); #if HOST_BITS_PER_LONG * 2 == HOST_BITS_PER_WIDE_INT ! add_AT_long_long (die, DW_AT_const_value, ! val >> HOST_BITS_PER_LONG, val); #else ! abort (); #endif } break; --- 8378,8390 ---- else if ((unsigned long) val == (unsigned HOST_WIDE_INT) val) add_AT_unsigned (die, DW_AT_const_value, (unsigned long) val); + else + { #if HOST_BITS_PER_LONG * 2 == HOST_BITS_PER_WIDE_INT ! add_AT_long_long (die, DW_AT_const_value, ! val >> HOST_BITS_PER_LONG, val); #else ! abort (); #endif + } } break;
next reply other threads:[~2001-10-29 3:26 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-10-29 3:26 brendan [this message] 2001-12-11 21:50 rodrigc 2001-12-11 21:56 rodrigc 2002-01-30 2:16 Brendan Kehoe 2002-02-17 18:34 rodrigc
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=20011029111742.2333.qmail@sourceware.cygnus.com \ --to=brendan@zen.org \ --cc=gcc-gnats@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).