-
Bug
-
Resolution: Fixed
-
P3
-
8
-
b15
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8042450 | 9 | Hannes Wallnoefer | P3 | Resolved | Fixed | b13 |
JDK-8045098 | 8u25 | Hannes Wallnoefer | P3 | Resolved | Fixed | b01 |
JDK-8052498 | emb-8u26 | Hannes Wallnoefer | P3 | Resolved | Fixed | b18 |
The following script:
var Thread = java.lang.Thread;
function test_thread() {
var line = 'content-type: text/html';
while (1) {
Thread.sleep(100);
line.split(/: /);
}
}
for (var i=0; i<5; i++) {
new Thread(test_thread).start();
}
while (1) { Thread.sleep(1000); }
Throws:
java.lang.NullPointerException
at jdk.nashorn.internal.runtime.regexp.joni.Regex.matcher(Regex.java:148)
at jdk.nashorn.internal.runtime.regexp.joni.Regex.matcher(Regex.java:143)
at jdk.nashorn.internal.runtime.regexp.JoniRegExp$JoniMatcher.<init>(JoniRegExp.java:126)
at jdk.nashorn.internal.runtime.regexp.JoniRegExp.match(JoniRegExp.java:101)
at jdk.nashorn.internal.objects.NativeRegExp.execSplit(NativeRegExp.java:581)
at jdk.nashorn.internal.objects.NativeRegExp.split(NativeRegExp.java:824)
at jdk.nashorn.internal.objects.NativeString.split(NativeString.java:878)
var Thread = java.lang.Thread;
function test_thread() {
var line = 'content-type: text/html';
while (1) {
Thread.sleep(100);
line.split(/: /);
}
}
for (var i=0; i<5; i++) {
new Thread(test_thread).start();
}
while (1) { Thread.sleep(1000); }
Throws:
java.lang.NullPointerException
at jdk.nashorn.internal.runtime.regexp.joni.Regex.matcher(Regex.java:148)
at jdk.nashorn.internal.runtime.regexp.joni.Regex.matcher(Regex.java:143)
at jdk.nashorn.internal.runtime.regexp.JoniRegExp$JoniMatcher.<init>(JoniRegExp.java:126)
at jdk.nashorn.internal.runtime.regexp.JoniRegExp.match(JoniRegExp.java:101)
at jdk.nashorn.internal.objects.NativeRegExp.execSplit(NativeRegExp.java:581)
at jdk.nashorn.internal.objects.NativeRegExp.split(NativeRegExp.java:824)
at jdk.nashorn.internal.objects.NativeString.split(NativeString.java:878)
- backported by
-
JDK-8042450 RegExp implementation is not thread-safe
- Resolved
-
JDK-8045098 RegExp implementation is not thread-safe
- Resolved
-
JDK-8052498 RegExp implementation is not thread-safe
- Resolved