Title: [243754] trunk/Source/_javascript_Core
Revision
243754
Author
msab...@apple.com
Date
2019-04-02 12:56:58 -0700 (Tue, 02 Apr 2019)

Log Message

Crash in Options::setOptions() using --configFile option and libgmalloc
https://bugs.webkit.org/show_bug.cgi?id=196506

Reviewed by Keith Miller.

Changed to call CString::data() while making the call to Options::setOptions().  This keeps
the implicit CString temporary alive until after setOptions() returns.

* runtime/ConfigFile.cpp:
(JSC::ConfigFile::parse):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (243753 => 243754)


--- trunk/Source/_javascript_Core/ChangeLog	2019-04-02 19:46:30 UTC (rev 243753)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-04-02 19:56:58 UTC (rev 243754)
@@ -1,3 +1,16 @@
+2019-04-02  Michael Saboff  <msab...@apple.com>
+
+        Crash in Options::setOptions() using --configFile option and libgmalloc
+        https://bugs.webkit.org/show_bug.cgi?id=196506
+
+        Reviewed by Keith Miller.
+
+        Changed to call CString::data() while making the call to Options::setOptions().  This keeps
+        the implicit CString temporary alive until after setOptions() returns.
+
+        * runtime/ConfigFile.cpp:
+        (JSC::ConfigFile::parse):
+
 2019-04-02  Fujii Hironori  <hironori.fu...@sony.com>
 
         [CMake] WEBKIT_MAKE_FORWARDING_HEADERS shouldn't use POST_BUILD to copy generated headers

Modified: trunk/Source/_javascript_Core/runtime/ConfigFile.cpp (243753 => 243754)


--- trunk/Source/_javascript_Core/runtime/ConfigFile.cpp	2019-04-02 19:46:30 UTC (rev 243753)
+++ trunk/Source/_javascript_Core/runtime/ConfigFile.cpp	2019-04-02 19:56:58 UTC (rev 243754)
@@ -465,9 +465,8 @@
             WTF::setDataFile(logPathname);
 
         if (!jscOptionsBuilder.isEmpty()) {
-            const char* optionsStr = jscOptionsBuilder.toString().utf8().data();
             Options::enableRestrictedOptions(true);
-            Options::setOptions(optionsStr);
+            Options::setOptions(jscOptionsBuilder.toString().utf8().data());
         }
     } else
         WTF::dataLogF("Error in JSC Config file on or near line %u, parsing '%s'\n", scanner.lineNumber(), scanner.currentBuffer());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to