public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* exception handling bug
@ 1997-07-31 21:14 Benjamin Sean Scarlet
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Sean Scarlet @ 1997-07-31 21:14 UTC (permalink / raw)
  To: gnu-win32 Mailing List

I'm running g++ from gnuwin32/b18, and wrote to this list a few days ago
noting that code in an exception handler is clobbering the this pointer
in the following test code:

void X::foo()
{
  cout << this << endl;
  try { throw 1; } catch(int) { cout << this << endl; }
  cout << this << endl;
}

After looking at the assember and the high level RTL, it looks like two
soft registers, one in the outer scope and one in the catch block, are
both getting mapped to the same hard register.  I'm not sufficiently
initiated into the inner mysteries of the exception handling mechanism
to be sure what the best way to handle this is.  I have ideas, but I'm
not sure what I'd muck up if I tried a fix.  Is there anyone out there
who both is knowledgable about stuff and has the time to answer a few
questions?  I'd like to hammer out a patch for this thing.

	Benjamin Scarlet
	MIT Center for Theoretical Physics
	scarlet@mit.edu
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

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

* exception handling bug
@ 1997-09-19  4:21 Vladimir belkin
  0 siblings, 0 replies; 2+ messages in thread
From: Vladimir belkin @ 1997-09-19  4:21 UTC (permalink / raw)
  To: gnu-win32; +Cc: egcs-bugs

Compile and run the program:
///////////////////////////////////////////////////
#include<iostream.h>

int main() {
  try {
    throw 1;
  } catch(...) {
   try {
     throw;
   } catch(int) {
   }
   try {
     throw;
   } catch(int) {
   }
  }
  return 0;
}
///////////////////////////////////////////////////
See wrong message:
ABORT instruction

PS: I am not a member to this list now.

--------
  Vladimir Belkin (vladimir.belkin@usa.net)
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

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

end of thread, other threads:[~1997-09-19  4:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-07-31 21:14 exception handling bug Benjamin Sean Scarlet
1997-09-19  4:21 Vladimir belkin

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