A new exception bug test case

H.J. Lu hjl@lucon.org
Fri Oct 3 14:14:00 GMT 1997


Hi,

I haven't heard anything back about the exception bug I reported
a few weeks ago. I sent in my analysis and a patch yesterday. The
only reponse I got was my old test case ran on SCO. I checked the
asm output on SCO. It is very clear that the asm output is bogus.
For whatever reason, it runs on SCO and the same asm output dumps
core on Linux.

I modified my test so that I hope SCO will abort this time. The
problem is exception handling and deferred pop. So far it only
shows up on x86 with DWARF unwind. Please see my previous message
for my analysis and kludge.

# gcc des.cc -O
# a.out
zsh: 5826 abort      ./a.out

Thanks.


-- 
H.J. Lu (hjl@gnu.ai.mit.edu)
---
class Int 
{
protected:
  int          rep;
public: 
  Int () :rep(0) {}
  Int (const Int& b) :rep(b.Int::val()) {}
  ~Int();
  operator int() const {check ();  return val(); }
  int   val() const {check (); return rep; }
  void  operator  = (const int b)
  { check (); rep = b; }
  void  operator ++ ()
  { check (); ++rep; }
  void check () const {if (this == (const Int *)2) abort ();}
};
Int::~Int() {check (); }
void Proc0();
void Proc7(Int IntParI1, Int IntParI2, Int *IntParOut);
main()
{
	Proc0();
	exit(0);
}
void Proc0()
{
	Int		IntLoc1;
	Int		IntLoc2;
	Int		IntLoc3;
	IntLoc1 = 2;
	IntLoc2 = 3;
	while (IntLoc1 < IntLoc2)
	{
		IntLoc3 = 5 * IntLoc1 - IntLoc2;
		Proc7(IntLoc1, IntLoc2, &IntLoc3);
		++IntLoc1;
	}
}
void Proc7(Int IntParI1, Int IntParI2, Int *IntParOut)
{
	Int	IntLoc;
	IntLoc = IntParI1 + 2;
	*IntParOut = IntParI2 + IntLoc;
}



More information about the Gcc mailing list