Details
-
Bug
-
Resolution: Fixed
-
P3
-
8u20
-
b17
-
generic
-
linux_ubuntu
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8043778 | 9 | Hannes Wallnoefer | P3 | Resolved | Fixed | b15 |
JDK-8045103 | 8u25 | Hannes Wallnoefer | P3 | Resolved | Fixed | b01 |
JDK-8052504 | emb-8u26 | Hannes Wallnoefer | P3 | Resolved | Fixed | b18 |
Description
FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
Nashorn version: hg tip 18edd7a1b166
The implementation for case-insensitive regular expressions does not comply to [ES5.1 - 15.10.2.8 Canonicalize]. This applies to both implementations, java.util.regex and Joni.
I've noticed this while working on integrating Joni for my project. You should be able to port the necessary changes from here [1]:
- UCS2Encoding.java contains the relevant changes for runtime.regexp.joni.EncodingHelper
- RegExpParser.java#L1256-L1412 contains the relevant changes for the java.util.regex based implementation
[1] https://github.com/anba/es6draft/tree/master/src/main/java/com/github/anba/es6draft/regexp
ADDITIONAL REGRESSION INFORMATION:
Java(TM) SE Runtime Environment (build 1.8.0-ea-b119)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b61, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Test cases:
jjs> /[\u2160]/i.test("\u2170")
Expected: true
Actual: false
jjs> /\u0130/i.test("\u0069")
Expected: false
Actual: true
jjs> /\u1e9e/i.test("\u00df")
Expected: false
Actual: true
jjs> /\u0345{4}/i.test("\u0345\u0399\u03b9\u1fbe")
Expected: true
Actual: false
REPRODUCIBILITY :
This bug can be reproduced always.
A DESCRIPTION OF THE PROBLEM :
Nashorn version: hg tip 18edd7a1b166
The implementation for case-insensitive regular expressions does not comply to [ES5.1 - 15.10.2.8 Canonicalize]. This applies to both implementations, java.util.regex and Joni.
I've noticed this while working on integrating Joni for my project. You should be able to port the necessary changes from here [1]:
- UCS2Encoding.java contains the relevant changes for runtime.regexp.joni.EncodingHelper
- RegExpParser.java#L1256-L1412 contains the relevant changes for the java.util.regex based implementation
[1] https://github.com/anba/es6draft/tree/master/src/main/java/com/github/anba/es6draft/regexp
ADDITIONAL REGRESSION INFORMATION:
Java(TM) SE Runtime Environment (build 1.8.0-ea-b119)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b61, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Test cases:
jjs> /[\u2160]/i.test("\u2170")
Expected: true
Actual: false
jjs> /\u0130/i.test("\u0069")
Expected: false
Actual: true
jjs> /\u1e9e/i.test("\u00df")
Expected: false
Actual: true
jjs> /\u0345{4}/i.test("\u0345\u0399\u03b9\u1fbe")
Expected: true
Actual: false
REPRODUCIBILITY :
This bug can be reproduced always.
Attachments
Issue Links
- backported by
-
JDK-8043778 Nashorn: Multiple RegExp#ignoreCase issues
- Resolved
-
JDK-8045103 Nashorn: Multiple RegExp#ignoreCase issues
- Resolved
-
JDK-8052504 Nashorn: Multiple RegExp#ignoreCase issues
- Resolved