RE: [Ikvm-developers] exception handling problem
Brought to you by:
jfrijters
From: Jeroen F. <je...@su...> - 2003-05-23 07:47:03
|
Hi, Thanks! Good catch. I checked in a fix for this problem, but as the comment says, the other jumps out of the try block should probably be handled as well. Here is the patch I checked in: Index: IK.VM.NET/compiler.cs =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/ikvm/ikvm/IK.VM.NET/compiler.cs,v retrieving revision 1.13 diff -u -r1.13 compiler.cs --- IK.VM.NET/compiler.cs 18 Apr 2003 10:27:33 -0000 1.13 +++ IK.VM.NET/compiler.cs 23 May 2003 07:29:25 -0000 @@ -193,7 +193,9 @@ ExceptionTableEntry ei =3D (ExceptionTableEntry)ar[i]; for(int j =3D FindPcIndex(ei.start_pc), e =3D FindPcIndex(ei.end_pc); j < e; j++) { - if(m.Instructions[j].NormalizedOpCode =3D=3D NormalizedByteCode.__jsr) + // TODO we probably should handle other branches here as well... + if(m.Instructions[j].NormalizedOpCode =3D=3D NormalizedByteCode.__jsr + || m.Instructions[j].NormalizedOpCode =3D=3D NormalizedByteCode.__goto) { int targetPC =3D m.Instructions[j].NormalizedArg1 + m.Instructions[j].PC; if(targetPC < ei.start_pc || targetPC >=3D ei.end_pc) Regards, Jeroen >=20 > -----Original Message----- > From: Varga Zoltan [mailto:va...@fr...]=20 > Sent: Friday, May 23, 2003 00:03 > To: ikv...@li... >=20 >=20 >=20 > Hi, >=20 > Running the attached testcase under IKVM produces no output,=20 > while it prints 'OK' while running under JDK 1.3.1. This code=20 > is from xerces, and it is causing some problems when trying=20 > to run eclipse. >=20 > bye >=20 > Zoltan >=20 |