Opened 6 years ago
#85 new defect
Exception throwing/handling is broken
Reported by: | Jan Vraný | Owned by: | Jan Vraný |
---|---|---|---|
Priority: | major | Milestone: | milestone: |
Component: | stx:libjava | Keywords: | |
Cc: |
Description
Exception handling / throwing is broken. Whenever an exception
is thrown, a context linenumber has to be set up properly in order
to find handler.
This is a problem especially for jitted code as it resorts to
caling helper functions like _throw() or _ldiv(). These functions
has to take current bytecode PC as argument.
The testcases should include something like
ex = new ArithmeticException("test"); try { throw ex; fail(); } catch (ArithmeticException ae) { // OK } catch (Exception e) { fail(); }
and of course
int i1 = 10; int i2 = 0; try { int r = i1 / i2; fail(); } catch (ArithmeticException ae) { // OK } catch (Exception e) { fail(); }
Note: See
TracTickets for help on using
tickets.