changeset 10822:f9111c7f7224

8196374: windows x86 webview-icu isAlphaNumericString crash Reviewed-by: arajkumar, mbilla, rkamath
author ghb
date Tue, 30 Jan 2018 22:24:58 +0530
parents 305d127c6ed5
children db96238aa863
files modules/javafx.web/src/main/native/Source/ThirdParty/icu/source/common/uloc_tag.c modules/javafx.web/src/test/java/test/javafx/scene/web/WebPageTest.java modules/javafx.web/src/test/resources/test/html/icutagparse.html
diffstat 3 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/modules/javafx.web/src/main/native/Source/ThirdParty/icu/source/common/uloc_tag.c	Fri Jan 26 08:04:30 2018 -0800
+++ b/modules/javafx.web/src/main/native/Source/ThirdParty/icu/source/common/uloc_tag.c	Tue Jan 30 22:24:58 2018 +0530
@@ -2073,6 +2073,14 @@
 #define EXTV 0x0040
 #define PRIV 0x0080
 
+/**
+ * Ticket #12705 - VS2015 update 3, 32 bit release has problems with this function.
+ * As a workaround, we will turn off optimization just for this function.
+ */
+#if (defined(_MSC_VER) && (_MSC_VER >= 1900))
+#pragma optimize( "", off )
+#endif
+
 static ULanguageTag*
 ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* status) {
     ULanguageTag *t;
@@ -2435,6 +2443,13 @@
     return NULL;
 }
 
+/**
+* Ticket #12705 - Turn optimization back on.
+*/
+#if (defined(_MSC_VER) && (_MSC_VER >= 1900))
+#pragma optimize( "", on )
+#endif
+
 static void
 ultag_close(ULanguageTag* langtag) {
 
--- a/modules/javafx.web/src/test/java/test/javafx/scene/web/WebPageTest.java	Fri Jan 26 08:04:30 2018 -0800
+++ b/modules/javafx.web/src/test/java/test/javafx/scene/web/WebPageTest.java	Tue Jan 30 22:24:58 2018 +0530
@@ -83,4 +83,10 @@
             assertEquals("Expected single frame : ", 1, WebPageShim.getFramesCount(page));
         });
     }
+
+    // JDK-8196011
+    @Test public void testICUTagParse() {
+        load(WebPageTest.class.getClassLoader().getResource(
+                "test/html/icutagparse.html").toExternalForm());
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/javafx.web/src/test/resources/test/html/icutagparse.html	Tue Jan 30 22:24:58 2018 +0530
@@ -0,0 +1,1 @@
+<a lang='roa-x-eml'>ò</a>