[PATCH 1/2] jit: fix basic block splitting

2009-07-29 Thread Vegard Nossum
On splitting a bb, the successors of the new bb were still pointing at the original bb. This caused the CFG to be inconsistent and subsequently also mimic stack spill/restore to do the wrong thing. This fixes the java.security.ProtectionDomain crash. Codebugged-by: Arthur Huillet

[PATCH 2/2] regression: add CFGCrashTest

2009-07-29 Thread Vegard Nossum
Signed-off-by: Vegard Nossum vegard.nos...@gmail.com --- Makefile |1 + regression/jvm/CFGCrashTest.java | 16 regression/run-suite.sh |1 + 3 files changed, 18 insertions(+), 0 deletions(-) create mode 100644

[PATCH 2/3] vm: skip mutex unlock in classloader_load() when load_class() fails.

2009-07-29 Thread Tomek Grabiec
Mutex lock is not held when calling lead_class() so we should not try to unlock it when the call fails. Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- vm/classloader.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/vm/classloader.c b/vm/classloader.c index

[PATCH 1/3] vm: fix vm_monitor_*wait() functions.

2009-07-29 Thread Tomek Grabiec
When falling asleep we must set the lock count to 0 and restore the count on wakeup. Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- vm/object.c | 18 -- 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/vm/object.c b/vm/object.c index 509e92d..e91c074 100644

[PATCH 3/3][V2] vm: fix error handling in monitor operations

2009-07-29 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- vm/object.c | 41 + 1 files changed, 25 insertions(+), 16 deletions(-) diff --git a/vm/object.c b/vm/object.c index e91c074..cb69dca 100644 --- a/vm/object.c +++ b/vm/object.c @@ -620,7 +620,11 @@ void

Re: [PATCH 1/2] jit: fix basic block splitting

2009-07-29 Thread Pekka Enberg
On Wed, 2009-07-29 at 12:15 +0200, Vegard Nossum wrote: On splitting a bb, the successors of the new bb were still pointing at the original bb. This caused the CFG to be inconsistent and subsequently also mimic stack spill/restore to do the wrong thing. This fixes the

[RFC][PATCH] jit: fix handling of split intervals in register allocator

2009-07-29 Thread Tomek Grabiec
Liveness analysis can produce intervals with range not ending at a use position. When splitting such interval after last use position we get the new interval with non-zero range length and without use positions. We should not add such intervals to the unhandled list. This bug led to incorrect