Title: [246792] trunk/Source/_javascript_Core
- Revision
- 246792
- Author
- [email protected]
- Date
- 2019-06-25 09:08:27 -0700 (Tue, 25 Jun 2019)
Log Message
REGRESSION(r245586): static assertion failed: Match result and EncodedMatchResult should be the same size
https://bugs.webkit.org/show_bug.cgi?id=198518
Reviewed by Keith Miller.
r245586 made some bad assumptions about the size of size_t, which we can solve using the
CPU(ADDRESS32) guard that I didn't know about.
This solution was developed by Mark Lam and Keith Miller. I'm just preparing the patch.
* runtime/MatchResult.h:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (246791 => 246792)
--- trunk/Source/_javascript_Core/ChangeLog 2019-06-25 14:59:18 UTC (rev 246791)
+++ trunk/Source/_javascript_Core/ChangeLog 2019-06-25 16:08:27 UTC (rev 246792)
@@ -1,3 +1,17 @@
+2019-06-25 Michael Catanzaro <[email protected]>
+
+ REGRESSION(r245586): static assertion failed: Match result and EncodedMatchResult should be the same size
+ https://bugs.webkit.org/show_bug.cgi?id=198518
+
+ Reviewed by Keith Miller.
+
+ r245586 made some bad assumptions about the size of size_t, which we can solve using the
+ CPU(ADDRESS32) guard that I didn't know about.
+
+ This solution was developed by Mark Lam and Keith Miller. I'm just preparing the patch.
+
+ * runtime/MatchResult.h:
+
2019-06-24 Commit Queue <[email protected]>
Unreviewed, rolling out r246714.
Modified: trunk/Source/_javascript_Core/runtime/MatchResult.h (246791 => 246792)
--- trunk/Source/_javascript_Core/runtime/MatchResult.h 2019-06-25 14:59:18 UTC (rev 246791)
+++ trunk/Source/_javascript_Core/runtime/MatchResult.h 2019-06-25 16:08:27 UTC (rev 246792)
@@ -31,10 +31,10 @@
namespace JSC {
struct MatchResult;
-#if CPU(ARM64) || CPU(X86_64)
+#if CPU(ADDRESS32)
+using EncodedMatchResult = uint64_t;
+#else
using EncodedMatchResult = MatchResult;
-#else
-using EncodedMatchResult = uint64_t;
#endif
struct MatchResult {
@@ -50,7 +50,7 @@
{
}
-#if !(CPU(ARM64) || CPU(X86_64))
+#if CPU(ADDRESS32)
ALWAYS_INLINE MatchResult(EncodedMatchResult match)
: start(bitwise_cast<MatchResult>(match).start)
, end(bitwise_cast<MatchResult>(match).end)
@@ -79,6 +79,7 @@
size_t end;
};
+static_assert(sizeof(EncodedMatchResult) == 2 * sizeof(size_t), "https://bugs.webkit.org/show_bug.cgi?id=198518#c11");
static_assert(sizeof(MatchResult) == sizeof(EncodedMatchResult), "Match result and EncodedMatchResult should be the same size");
} // namespace JSC
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes