corda/test
Joel Dice 99bb7924b0 fix stack frame mapping code for exception handlers
Previously, the stack frame mapping code (responsible for statically
calculating the map of GC roots for a method's stack frame during JIT
compilation) would assume that the map of GC roots on entry to an
exception handler is the same as on entry to the "try" block which the
handler is attached to.  Technically, this is true, but the algorithm
we use does not consider whether a local variable is still "live"
(i.e. will be read later) when calculating the map - only whether we
can expect to find a reference there via normal (non-exceptional)
control flow.  This can backfire if, within a "try" block, the stack
location which held an object reference on entry to the block gets
overwritten with a non-reference (i.e. a primitive).  If an exception
is later thrown from such a block, we might end up trying to treat
that non-reference as a reference during GC, which will crash the VM.

The ideal way to fix this is to calculate the true interval for which
each value is live and use that to produce the stack frame maps.  This
would provide the added benefit of ensuring that the garbage collector
does not visit references which, although still present on the stack,
will not be used again.

However, this commit uses the less invasive strategy of ANDing
together the root maps at each GC point within a "try" block and using
the result as the map on entry to the corresponding exception
handler(s).  This should give us safe, if not optimal, results.  Later
on, we can refine it as described above.
2010-02-04 18:03:32 -07:00
..
extra move continuations tests into test/extra 2009-05-25 23:30:40 -06:00
AllFloats.java refactor code responsible for moving data in the compiler 2009-11-27 21:15:12 -07:00
Annotations.java support runtime-visible annotations and java.lang.reflect.Proxy 2009-09-18 18:01:54 -06:00
Arrays.java add tests to Arrays.java and Longs.java 2009-02-02 19:12:07 -07:00
BitsetTest.java java.util.BitSet implementation 2008-07-13 18:16:55 -06:00
Enums.java Implemented proper enum toString() behavior and an enum test. it should 2007-09-26 12:59:18 -06:00
Exceptions.java implement primitive testing framework and provide for GC stress testing 2007-07-15 19:03:02 -06:00
Finalizers.java run java finalizers in a separate thread to guarantee no application locks are held when doing so 2009-08-24 17:51:31 -06:00
Floats.java various bugfixes for handling 64-bit floating point values on 32-bit systems 2009-11-30 15:10:34 +00:00
GC.java fix stack frame mapping code for exception handlers 2010-02-04 18:03:32 -07:00
Hello.java revert accidentally-committed change to Hello.java 2008-10-21 17:42:05 -06:00
Integers.java more work on Integers.java 2009-03-13 18:36:11 -06:00
List.java add AbstractList and AbstractSequentialList classes to java.util and listIterator methods to java.util.List 2009-08-04 17:24:29 -06:00
Logging.java Add a default logging handler, in case the user doesn't provide any. 2007-09-27 12:42:06 -06:00
Longs.java fix 32-bit shift case in unsignedShiftRightC 2009-08-11 12:36:25 -06:00
Misc.java fix handling of volatile longs and doubles on PowerPC 2010-01-27 17:46:04 -07:00
NullPointer.java intercept SIGSEGV and throw NullPointerExceptions 2007-12-31 15:40:56 -07:00
Proxies.java support runtime-visible annotations and java.lang.reflect.Proxy 2009-09-18 18:01:54 -06:00
References.java fix handling of reachable, moved weak references in postVisit 2009-09-01 17:23:30 -06:00
Reflection.java quick sketch of java/io/* 2007-07-24 18:34:45 -06:00
Simple.java fix Exceptions test for amd64 2008-11-02 15:25:51 -07:00
Strings.java implement enough of java.util.regex to ensure String methods work for trivial regular expressions 2009-08-20 11:14:05 -06:00
Subroutine.java fix handling of subroutines in methods of return type long on 32-bit systems 2009-10-06 03:17:12 +00:00
Switch.java implement tableswitch and lookupswitch instructions plus run loop bugfixes and tweaks 2007-08-12 20:52:12 -06:00
test.sh remove bashism from test.sh 2009-08-06 15:58:26 -06:00
Threads.java implement primitive testing framework and provide for GC stress testing 2007-07-15 19:03:02 -06:00
Tree.java remove unused inner class in Tree.java 2009-07-28 16:58:33 -06:00
Zip.java more progress towards GNU Classpath compatibility 2009-06-03 16:17:55 -06:00