ArrayIndexOutOfBoundsException and NPE in regexp-Code

Benjamin Sieffert benjamin.sieffert at metrigo.de
Wed Jul 2 09:39:50 UTC 2014


Hello everyone,

we are running jdk8u5 and seeing occasional errors in the nashorn-internal
regexp classes.
The regex in use is a very simple one that basically is just supposed to do
several string matches in a readable manner like /some
string|stringtotestfor|test for this string too/

Some sample stacktraces:

1) ArrayIndexOutOfBoundsException: 8

jdk.nashorn.internal.runtime.regexp.joni.ByteCodeMachine.opExactNIC(ByteCodeMachine.java:381):1
in ""

jdk.nashorn.internal.runtime.regexp.joni.ByteCodeMachine.matchAt(ByteCodeMachine.java:129):1
in ""

jdk.nashorn.internal.runtime.regexp.joni.Matcher.matchCheck(Matcher.java:272):1
in ""

jdk.nashorn.internal.runtime.regexp.joni.Matcher.search(Matcher.java:405):1
in ""

jdk.nashorn.internal.runtime.regexp.JoniRegExp$JoniMatcher.search(JoniRegExp.java:131):1
in ""

jdk.nashorn.internal.objects.NativeRegExp.execInner(NativeRegExp.java:559):1
in ""

jdk.nashorn.internal.objects.NativeRegExp.test(NativeRegExp.java:643):1 in
""

jdk.nashorn.internal.objects.NativeRegExp.test(NativeRegExp.java:322):1 in
""

jdk.nashorn.internal.scripts.Script$library$2._L356(library:460):1 in ""

2) NPE

jdk.nashorn.internal.runtime.regexp.joni.ByteCodeMachine.opExactN(ByteCodeMachine.java:361):1
in ""

jdk.nashorn.internal.runtime.regexp.joni.ByteCodeMachine.matchAt(ByteCodeMachine.java:126):1
in ""

jdk.nashorn.internal.runtime.regexp.joni.Matcher.matchCheck(Matcher.java:272):1
in ""

jdk.nashorn.internal.runtime.regexp.joni.Matcher.search(Matcher.java:405):1
in ""

jdk.nashorn.internal.runtime.regexp.JoniRegExp$JoniMatcher.search(JoniRegExp.java:131):1
in ""

jdk.nashorn.internal.objects.NativeRegExp.execInner(NativeRegExp.java:559):1
in ""

jdk.nashorn.internal.objects.NativeRegExp.test(NativeRegExp.java:643):1 in
""

jdk.nashorn.internal.objects.NativeRegExp.test(NativeRegExp.java:322):1 in
""

jdk.nashorn.internal.scripts.Script$library$2._L356(library:460):1 in ""

Would be nice to get some input on this. Sadly, there I don't have a
reliable way to reproduce this
 right now. Script gets evaluated in a multithreaded environment, so it
might have something to do with that.

Regards

-- 
Benjamin Sieffert
metrigo GmbH
Sternstr. 106
20357 Hamburg

Geschäftsführer: Christian Müller, Tobias Schlottke, Philipp Westermeyer,
Martin Rieß
Die Gesellschaft ist eingetragen beim Registergericht Hamburg
Nr. HRB 120447.


More information about the nashorn-dev mailing list