public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* bootstrap/4727: dwarf2 debugging crashes cc1plus building libstdc++
@ 2001-10-29  3:26 brendan
  0 siblings, 0 replies; 5+ messages in thread
From: brendan @ 2001-10-29  3:26 UTC (permalink / raw)
  To: gcc-gnats

>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;


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bootstrap/4727: dwarf2 debugging crashes cc1plus building libstdc++
@ 2002-02-17 18:34 rodrigc
  0 siblings, 0 replies; 5+ messages in thread
From: rodrigc @ 2002-02-17 18:34 UTC (permalink / raw)
  To: brendan, gcc-bugs, gcc-prs, nobody

Synopsis: dwarf2 debugging crashes cc1plus building libstdc++

State-Changed-From-To: feedback->closed
State-Changed-By: rodrigc
State-Changed-When: Sun Feb 17 18:34:35 2002
State-Changed-Why:
    Closed on request of submitter.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4727


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bootstrap/4727: dwarf2 debugging crashes cc1plus building libstdc++
@ 2002-01-30  2:16 Brendan Kehoe
  0 siblings, 0 replies; 5+ messages in thread
From: Brendan Kehoe @ 2002-01-30  2:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR bootstrap/4727; it has been noted by GNATS.

From: Brendan Kehoe <brendan@zen.org>
To: rodrigc@gcc.gnu.org, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org
Cc:  
Subject: Re: bootstrap/4727: dwarf2 debugging crashes cc1plus building libstdc++
Date: Wed, 30 Jan 2002 10:08:19 +0000

 rodrigc@gcc.gnu.org wrote:
 
 >Synopsis: dwarf2 debugging crashes cc1plus building libstdc++
 >
 >State-Changed-From-To: open->feedback
 >State-Changed-By: rodrigc
 >State-Changed-When: Tue Dec 11 21:50:32 2001
 >State-Changed-Why:
 >    Can you contribute a patch and a ChangeLog entry
 >    with the necessary fix?
 >
 It appears that Richard Kenner corrected this bug the same day I 
 submitted the PR on it.  This PR can be closed.
 
 B
 
 
 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bootstrap/4727: dwarf2 debugging crashes cc1plus building libstdc++
@ 2001-12-11 21:56 rodrigc
  0 siblings, 0 replies; 5+ messages in thread
From: rodrigc @ 2001-12-11 21:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR bootstrap/4727; it has been noted by GNATS.

From: rodrigc@gcc.gnu.org
To: brendan@zen.org, gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org,
  gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org
Cc:  
Subject: Re: bootstrap/4727: dwarf2 debugging crashes cc1plus building libstdc++
Date: 12 Dec 2001 05:50:34 -0000

 Synopsis: dwarf2 debugging crashes cc1plus building libstdc++
 
 State-Changed-From-To: open->feedback
 State-Changed-By: rodrigc
 State-Changed-When: Tue Dec 11 21:50:32 2001
 State-Changed-Why:
     Can you contribute a patch and a ChangeLog entry
     with the necessary fix?
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4727&database=gcc


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bootstrap/4727: dwarf2 debugging crashes cc1plus building libstdc++
@ 2001-12-11 21:50 rodrigc
  0 siblings, 0 replies; 5+ messages in thread
From: rodrigc @ 2001-12-11 21:50 UTC (permalink / raw)
  To: brendan, gcc-bugs, gcc-gnats, gcc-prs, nobody

Synopsis: dwarf2 debugging crashes cc1plus building libstdc++

State-Changed-From-To: open->feedback
State-Changed-By: rodrigc
State-Changed-When: Tue Dec 11 21:50:32 2001
State-Changed-Why:
    Can you contribute a patch and a ChangeLog entry
    with the necessary fix?

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4727&database=gcc


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-02-18  2:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-29  3:26 bootstrap/4727: dwarf2 debugging crashes cc1plus building libstdc++ brendan
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

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).