Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: third_party/libxml/src/xmlstring.c

Issue 1886903003: Workaround for VC++ 2015 Update 2 code-gen bug (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libxml/README.chromium ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libxml/src/xmlstring.c
diff --git a/third_party/libxml/src/xmlstring.c b/third_party/libxml/src/xmlstring.c
index a37220d7808b0db5530e7239e5b107aacde26cb4..d9b5085db430e7ce6b260f885472bccdf92017b6 100644
--- a/third_party/libxml/src/xmlstring.c
+++ b/third_party/libxml/src/xmlstring.c
@@ -821,6 +821,13 @@ xmlCheckUTF8(const unsigned char *utf)
* the first 'len' characters of ARRAY
*/
+#if _MSC_FULL_VER && _MSC_FULL_VER == 190023918
+// Workaround for a /O1 ("s") optimization bug in VS 2015 Update 2, remove once
+// the fix is released. crbug.com/599427
+// https://connect.microsoft.com/VisualStudio/feedback/details/2582138
+#pragma optimize("t", on)
+#endif
+
int
xmlUTF8Strsize(const xmlChar *utf, int len) {
const xmlChar *ptr=utf;
@@ -844,6 +851,10 @@ xmlUTF8Strsize(const xmlChar *utf, int len) {
return (ptr - utf);
}
+#if _MSC_FULL_VER && _MSC_FULL_VER == 190023918
+// Restore the original optimization settings.
+#pragma optimize("", on)
+#endif
/**
* xmlUTF8Strndup:
« no previous file with comments | « third_party/libxml/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698