[webkit-reviews] review granted: [Bug 198518] [GTK] [2.25.1] static assertion failed: Match result and EncodedMatchResult should be the same size : [Attachment 372782] proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 24 12:10:46 PDT 2019


Eike Rathke <erack at redhat.com> has granted  review:
Bug 198518: [GTK] [2.25.1] static assertion failed: Match result and
EncodedMatchResult should be the same size
https://bugs.webkit.org/show_bug.cgi?id=198518

Attachment 372782: proposed patch

https://bugs.webkit.org/attachment.cgi?id=372782&action=review




--- Comment #5 from Eike Rathke <erack at redhat.com> ---
Created attachment 372782

  --> https://bugs.webkit.org/attachment.cgi?id=372782&action=review

proposed patch

It is unclear to me why in Source/JavaScriptCore/runtime/MatchResult.h the
EncodedMatchResult should depend on CPU, but clearly with

  using EncodedMatchResult = uint64_t;

and

  static_assert(sizeof(MatchResult) == sizeof(EncodedMatchResult))

and the two size_t member variables of MatchResult that can compile only if
size_t is 32-bit and the member variables aligned. So the straight forward
change would be to do exactly that, but I don't know if there is a reason to
have CPU type involved here (because of JIT asm).

Attached is a tad ugly patch which on ppc64le at least compiles.

Does that suit the purpose? If yes, I can create a ready-to-commit patch.


More information about the webkit-reviews mailing list