Ignore:
Timestamp:
Jul 16, 2021, 3:18:46 PM (4 years ago)
Author:
[email protected]
Message:

Unreviewed, reverting r279916.
https://bugs.webkit.org/show_bug.cgi?id=228037

some of tests are timing out

Reverted changeset:

"Convert small JIT pool tests into executable fuzzing"
https://bugs.webkit.org/show_bug.cgi?id=226279
https://commits.webkit.org/r279916

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/ExecutableAllocationFuzz.cpp

    r279916 r280004  
    4242ExecutableAllocationFuzzResult doExecutableAllocationFuzzing()
    4343{
    44     static WeakRandom random(Options::seedOfVMRandomForFuzzer() ? Options::seedOfVMRandomForFuzzer() : cryptographicallyRandomNumber());
    45 
    4644    ASSERT(Options::useExecutableAllocationFuzz());
    4745
     
    6260    }
    6361   
    64     unsigned numChecks = s_numberOfExecutableAllocationFuzzChecks.value++;
    65 
    66     if (numChecks == Options::fireExecutableAllocationFuzzAt()) {
     62    unsigned oldValue;
     63    unsigned newValue;
     64    do {
     65        oldValue = s_numberOfExecutableAllocationFuzzChecks.load();
     66        newValue = oldValue + 1;
     67    } while (!s_numberOfExecutableAllocationFuzzChecks.compareExchangeWeak(oldValue, newValue));
     68   
     69    if (newValue == Options::fireExecutableAllocationFuzzAt()) {
    6770        if (Options::verboseExecutableAllocationFuzz()) {
    6871            dataLog("Will pretend to fail executable allocation.\n");
     
    7174        return PretendToFailExecutableAllocation;
    7275    }
    73 
     76   
    7477    if (Options::fireExecutableAllocationFuzzAtOrAfter()
    75         && numChecks >= Options::fireExecutableAllocationFuzzAtOrAfter()) {
     78        && newValue >= Options::fireExecutableAllocationFuzzAtOrAfter()) {
    7679        if (Options::verboseExecutableAllocationFuzz()) {
    7780            dataLog("Will pretend to fail executable allocation.\n");
     
    7982        }
    8083        return PretendToFailExecutableAllocation;
    81     } else if (!Options::fireExecutableAllocationFuzzAt() && random.getUint32() < UINT_MAX * Options::randomIntegrityAuditRate())
    82         return PretendToFailExecutableAllocation;
     84    }
    8385   
    8486    return AllowNormalExecutableAllocation;
Note: See TracChangeset for help on using the changeset viewer.