public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* More exception bug
@ 1997-10-03 14:42 H.J. Lu
  0 siblings, 0 replies; 3+ messages in thread
From: H.J. Lu @ 1997-10-03 14:42 UTC (permalink / raw)
  To: egcs

Hi,

I was told g++.mike/eh35.C failed because nested exception hanlding
didn't work. I used a different malloc. This time I got

(gdb) r
Starting program:
/home/work/gnu/src/egcs/gcc/testsuite/g++.old-deja/a.out 
 
Breakpoint 1, 0x804b0a9 in __libc_malloc (size=24) at malloc.c:160
160     {
(gdb) bt
#0  0x804b0a9 in __libc_malloc (size=24) at malloc.c:160
#1  0x8049991 in __register_frame (begin=0x1)
#2  0x8048085 in _init ()
(gdb) c
Continuing.
 
Breakpoint 1, 0x804b0a9 in __libc_malloc (size=4096) at malloc.c:160
160     {
(gdb) bt
#0  0x804b0a9 in __libc_malloc (size=4096) at malloc.c:160
#1  0x804b192 in __libc_malloc (size=24) at malloc.c:220
#2  0x8049991 in __register_frame (begin=0x1)
#3  0x8048085 in _init ()
(gdb) c
Continuing.
 
Breakpoint 1, 0x804b0a9 in __libc_malloc (size=1) at malloc.c:160
160     {
(gdb) bt
#0  0x804b0a9 in __libc_malloc (size=1) at malloc.c:160
#1  0x8048c2c in ___builtin_new (sz=3221224644)
#2  0x80480ee in ___crt_dummy__ ()
(gdb) c
Continuing.
 
Breakpoint 1, 0x804b0a9 in __libc_malloc (size=4096) at malloc.c:160
160     {
(gdb) bt
#0  0x804b0a9 in __libc_malloc (size=4096) at malloc.c:160
#1  0x804b192 in __libc_malloc (size=1) at malloc.c:220
#2  0x8048c2c in ___builtin_new (sz=3221224644)
#3  0x80480ee in ___crt_dummy__ ()
(gdb) c
Continuing.
 
Breakpoint 1, 0x804b0a9 in __libc_malloc (size=428) at malloc.c:160
160     {
(gdb) bt
#0  0x804b0a9 in __libc_malloc (size=428) at malloc.c:160
#1  0x804908c in frame_init (ob=Cannot access memory at address 0xb7.
)
Cannot access memory at address 0x6b.
(gdb) c
Continuing.
 
Breakpoint 1, 0x804b0a9 in __libc_malloc (size=4096) at malloc.c:160
160     {
(gdb) bt
#0  0x804b0a9 in __libc_malloc (size=4096) at malloc.c:160
#1  0x804b192 in __libc_malloc (size=428) at malloc.c:220
#2  0x804908c in frame_init (ob=Cannot access memory at address 0xb7.
)
Cannot access memory at address 0x6b.
(gdb) c
Continuing.
 
Breakpoint 1, 0x804b0a9 in __libc_malloc (size=1) at malloc.c:160
160     {
(gdb) bt
#0  0x804b0a9 in __libc_malloc (size=1) at malloc.c:160
#1  0x8048c2c in ___builtin_new (sz=3221224644)
#2  0x80480ee in ___crt_dummy__ ()
(gdb) c
Continuing.
 
Breakpoint 2, 0x804b82f in __libc_free (ptr=0x8055ff8) at free.c:204
204     {
#0  0x804b82f in __libc_free (ptr=0x8055ff8) at free.c:204
#1  0x8048bef in ___builtin_delete (ptr=0x8050ab4)
#2  0x8048275 in main () at g++.mike/eh35.C:13
#3  0x80480ee in ___crt_dummy__ ()
 
Breakpoint 2, 0x804b82f in __libc_free (ptr=0x8055ff8) at free.c:204
204     {
#0  0x804b82f in __libc_free (ptr=0x8055ff8) at free.c:204
#1  0x8048bef in ___builtin_delete (ptr=0x8050ab4)
#2  0x804828d in main () at g++.mike/eh35.C:13
#3  0x80480ee in ___crt_dummy__ ()
 
Breakpoint 2, 0x804b82f in __libc_free (ptr=0x8056000) at free.c:204
204     {
#0  0x804b82f in __libc_free (ptr=0x8056000) at free.c:204
#1  0x8049a52 in __deregister_frame (begin=0x0)
#2  0x804d8c5 in _fini ()
#3  0x80480f4 in ___crt_dummy__ ()
 
---Type <return> to continue, or q <return> to quit---
Breakpoint 2, 0x804b82f in __libc_free (ptr=0x8054000) at free.c:204
204     {
#0  0x804b82f in __libc_free (ptr=0x8054000) at free.c:204
#1  0x8049a5b in __deregister_frame (begin=0x0)
#2  0x804d8c5 in _fini ()
#3  0x80480f4 in ___crt_dummy__ ()
 
Program exited normally.

This time the binary returns 0. BTW, I am using DWARF unwind on
x86. Hope it helps.

Thanks.


-- 
H.J. Lu (hjl@gnu.ai.mit.edu)

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

* Re: More exception bug
  1997-10-03 17:13 Mike Stump
@ 1997-10-08 15:42 ` H.J. Lu
  0 siblings, 0 replies; 3+ messages in thread
From: H.J. Lu @ 1997-10-08 15:42 UTC (permalink / raw)
  To: Mike Stump; +Cc: egcs

> 
> > From: hjl@lucon.org (H.J. Lu)
> > To: egcs@cygnus.com
> > Date: Fri, 3 Oct 1997 14:41:55 -0700 (PDT)
> 
> > I was told g++.mike/eh35.C failed because nested exception hanlding
> > didn't work.
> 
> You have been misinformed.  It should work, it did work.
> 

It didn't work for me. gcc uses __eh_value to store exception.
When the new exception is thrown, the old one gets lost and
the same memory gets deleted twice.


-- 
H.J. Lu (hjl@gnu.ai.mit.edu)

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

* Re: More exception bug
@ 1997-10-03 17:13 Mike Stump
  1997-10-08 15:42 ` H.J. Lu
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Stump @ 1997-10-03 17:13 UTC (permalink / raw)
  To: egcs, hjl

> From: hjl@lucon.org (H.J. Lu)
> To: egcs@cygnus.com
> Date: Fri, 3 Oct 1997 14:41:55 -0700 (PDT)

> I was told g++.mike/eh35.C failed because nested exception hanlding
> didn't work.

You have been misinformed.  It should work, it did work.

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

end of thread, other threads:[~1997-10-08 15:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-03 14:42 More exception bug H.J. Lu
1997-10-03 17:13 Mike Stump
1997-10-08 15:42 ` H.J. Lu

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