[webkit-changes] [WebKit/WebKit] 08395c: REGRESSION(267629 at main): create_hash_table script ...

Michael Catanzaro noreply at github.com
Fri Dec 8 15:53:15 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 08395c362d950165a0646c78ce89101979ba2618
      https://github.com/WebKit/WebKit/commit/08395c362d950165a0646c78ce89101979ba2618
  Author: Michael Catanzaro <mcatanzaro at redhat.com>
  Date:   2023-12-08 (Fri, 08 Dec 2023)

  Changed paths:
    M Source/JavaScriptCore/create_hash_table
    M Source/WebCore/bindings/scripts/Hasher.pm
    M Source/WebCore/bindings/scripts/test/JS/JSTestConditionallyReadWrite.cpp
    M Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp

  Log Message:
  -----------
  REGRESSION(267629 at main): create_hash_table script runs forever on i686
https://bugs.webkit.org/show_bug.cgi?id=265554

Reviewed by Mark Lam.

This reverts 267629 at main, and also adds some additional safety checks to
the create_hash_table script.

bigint and Math::BigInt are two completely different perl modules.
bigint causes the entire script to transparently use Math::BigInt for
mathematical operations. Importing the wrong module effectively sabotaged
the script. Whoops.

bigint appears to be part of a standard perl installation, so for
upstream purposes we can expect it to be always available. However,
Fedora packages the perl interpreter separately from its modules. When I
went to install the bigint module, I tricked myself into thinking it was
already installed because Math::BigInt was installed, and another
developer suggested that the import syntax was wrong, and I improperly
went along with this because I am not very familiar with perl.

So, fix the import syntax to make this script actually use big integers
again. This fixes an infinite loop on 32-bit platforms if perl is not
compiled with 64-bit integer support. It also affects the generated hash
tables, so I had to rebase two of the bindings test results.

Also, add new safety checks to ensure the script fails if the hash
size grows too large. This will prevent the script from infinite looping
if somebody else breaks the script in the future. The guard values I
selected are arbitrary numbers that are much bigger than expected.

* Source/JavaScriptCore/create_hash_table:
* Source/WebCore/bindings/scripts/Hasher.pm:
* Source/WebCore/bindings/scripts/test/JS/JSTestConditionallyReadWrite.cpp:
(WebCore::JSTestConditionallyReadWriteDOMConstructor::prototypeForStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp:

Canonical link: https://commits.webkit.org/271765@main




More information about the webkit-changes mailing list