Mercurial > hg > release > icedtea6-1.3
view patches/icedtea-lucene-crash.patch @ 1054:b5b66d8e6014
* patches/icedtea-lucene-crash.patch: New patch.
* Makefile.am (NON_ZERO_PATCHES): Add icedtea-lucene-crash.patch.
* HACKING: Document icedtea-lucene-crash.patch.
author | Mark Wielaard <mark@klomp.org> |
---|---|
date | Thu, 25 Sep 2008 23:35:32 +0200 |
parents | |
children |
line wrap: on
line source
diff -r 4aebfff4f8a2 hotspot/src/share/vm/opto/parse2.cpp --- openjdk.orig/hotspot/src/share/vm/opto/parse2.cpp Mon Sep 15 11:38:34 2008 +0200 +++ openjdk/hotspot/src/share/vm/opto/parse2.cpp Thu Sep 25 21:54:26 2008 +0200 @@ -868,6 +868,8 @@ return prob < PROB_MIN; } +//-------------------------------repush_if_args-------------------------------- +// Push arguments of an "if" bytecode back onto the stack by adjusting _sp. inline void Parse::repush_if_args() { #ifndef PRODUCT if (PrintOpto && WizardMode) { @@ -896,7 +898,6 @@ if (PrintOpto && Verbose) tty->print_cr("Never-taken backedge stops compilation at bci %d",bci()); #endif - repush_if_args(); // to gather stats on loop uncommon_trap(Deoptimization::Reason_unreached, Deoptimization::Action_reinterpret, NULL, "cold"); diff -r 51798f0e554f test/compiler/6707044/LuceneCrash.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ openjdk/hotspot/test/compiler/6707044/LuceneCrash.java Thu Sep 25 21:55:28 2008 +0200 @@ -0,0 +1,40 @@ +/* + * @test + * @bug 6707044 + * @summary uncommon_trap of ifnull bytecode leaves garbage on expression stack + * @run main/othervm -Xbatch LuceneCrash + */ +public class LuceneCrash { + + public static void main(String[] args) throws Throwable { + new LuceneCrash().crash(); + } + + private Object alwaysNull; + + final void crash() throws Throwable { + for (int r = 0; r < 3; r++) { + for (int docNum = 0; docNum < 10000;) { + if (r < 2) { + for(int j=0;j<3000;j++) + docNum++; + } else { + docNum++; + doNothing(getNothing()); + if (alwaysNull != null) { + throw new RuntimeException("BUG: checkAbort is always null: r=" + r + " of 3; docNum=" + docNum); + } + } + } + } + } + + Object getNothing() { + return this; + } + + int x; + void doNothing(Object o) { + x++; + } +}