Title: [255171] trunk/Source/_javascript_Core
Revision
255171
Author
[email protected]
Date
2020-01-27 13:46:35 -0800 (Mon, 27 Jan 2020)

Log Message

REGRESSION (r250009): testair crashes in (anonymous namespace)::matchAll
<https://webkit.org/b/206797>
<rdar://problem/58893221>

Reviewed by Yusuke Suzuki.

* b3/air/testair.cpp:
((anonymous namespace)::matchAll): Don't replace `str` in the
body of the for loop since `match` references it.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (255170 => 255171)


--- trunk/Source/_javascript_Core/ChangeLog	2020-01-27 21:41:43 UTC (rev 255170)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-01-27 21:46:35 UTC (rev 255171)
@@ -1,3 +1,15 @@
+2020-01-27  David Kilzer  <[email protected]>
+
+        REGRESSION (r250009): testair crashes in (anonymous namespace)::matchAll
+        <https://webkit.org/b/206797>
+        <rdar://problem/58893221>
+
+        Reviewed by Yusuke Suzuki.
+
+        * b3/air/testair.cpp:
+        ((anonymous namespace)::matchAll): Don't replace `str` in the
+        body of the for loop since `match` references it.
+
 2020-01-27  Ryan Haddad  <[email protected]>
 
         Unreviewed, rolling out r255159.

Modified: trunk/Source/_javascript_Core/b3/air/testair.cpp (255170 => 255171)


--- trunk/Source/_javascript_Core/b3/air/testair.cpp	2020-01-27 21:41:43 UTC (rev 255170)
+++ trunk/Source/_javascript_Core/b3/air/testair.cpp	2020-01-27 21:46:35 UTC (rev 255171)
@@ -2069,9 +2069,8 @@
 {
     Vector<String> matches;
     std::smatch match;
-    for (std::string str = source.data(); std::regex_search(str, match, regex);) {
+    for (std::string str = source.data(); std::regex_search(str, match, regex); str = match.suffix()) {
         ASSERT(match.size() == 1);
-        str = match.suffix();
         matches.append(match[0].str().c_str());
     }
     return matches;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to