<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>233682</bug_id>
          
          <creation_ts>2021-11-30 22:31:55 -0800</creation_ts>
          <short_desc>[JSC] HeapBigInt CompareStrictEq should call use after speculation checks</short_desc>
          <delta_ts>2022-09-19 19:14:16 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>WebKit Local Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Lukas Bernhard">lukas.bernhard</reporter>
          <assigned_to name="Yusuke Suzuki">ysuzuki</assigned_to>
          <cc>lukas.bernhard</cc>
    
    <cc>saam</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1819099</commentid>
    <comment_count>0</comment_count>
    <who name="Lukas Bernhard">lukas.bernhard</who>
    <bug_when>2021-11-30 22:31:55 -0800</bug_when>
    <thetext>During differential testing of webkit I found a sample triggering a miscomputation in FTL.

JSC on git commit: 65d77d21751c
build options:
./Tools/Scripts/build-jsc --jsc-only --release --cmakeargs=&quot;-DENABLE_STATIC_JSC=ON -DCMAKE_C_COMPILER=&apos;/usr/bin/clang-12&apos; -DCMAKE_CXX_COMPILER=&apos;/usr/bin/clang++-12&apos; -DCMAKE_CXX_FLAGS=&apos;-O3 -lrt -latomic -fuse-ld=lld&apos;&quot;

command line:
RefBuild/Release/bin/jsc --validateOptions=true --useConcurrentJIT=false --useConcurrentGC=false --validateBCE=true --thresholdForJITSoon=10 --thresholdForJITAfterWarmUp=10 --thresholdForOptimizeAfterWarmUp=100 --thresholdForOptimizeAfterLongWarmUp=100 --thresholdForOptimizeSoon=100 --thresholdForFTLOptimizeAfterWarmUp=1000 diff.js

differs from:
RefBuild/Release/bin/jsc --validateOptions=true --useConcurrentJIT=false --useConcurrentGC=false --validateBCE=true --useFTLJIT=false diff.js


```
function main() { 
    let v37;
    let v20 = 129n &lt;&lt; 129n;
    const v21 = v20++;
        
    function v29(v30) {
        switch (v21) {
        default:
            for (let v34 = 1; v34 &lt; 65536; v34++) { } 
            break;
        case v30: 
            v37 = 1; // should never be reached, however this is executed in baseline
        }   
    }   
        
    v29(BigInt(129n));
    v29([1]);
        
    print(v37);  // prints 1 without FTL, undefined with FLT (also undefined in spidermonkey)
}
main();
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1821398</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-12-07 22:32:27 -0800</bug_when>
    <thetext>&lt;rdar://problem/86192953&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1842840</commentid>
    <comment_count>2</comment_count>
    <who name="Lukas Bernhard">lukas.bernhard</who>
    <bug_when>2022-02-17 05:23:52 -0800</bug_when>
    <thetext>While I understand this issue might not be of high relevance, I encounter this correctness error quite often during fuzzing. This makes deduplication of findings rather tedious.
If fixing the underlying problem is not in scope for now, could the engine maybe emit some kind of fprintf(stderr, &quot;known correctness error&quot;) so fuzzers could skip the particular problem?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1899371</commentid>
    <comment_count>3</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2022-09-18 12:00:14 -0700</bug_when>
    <thetext>(In reply to Lukas Bernhard from comment #2)
&gt; While I understand this issue might not be of high relevance, I encounter
&gt; this correctness error quite often during fuzzing. This makes deduplication
&gt; of findings rather tedious.
&gt; If fixing the underlying problem is not in scope for now, could the engine
&gt; maybe emit some kind of fprintf(stderr, &quot;known correctness error&quot;) so
&gt; fuzzers could skip the particular problem?

Yeah, this should just be fixed to unblock the fuzzer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1899679</commentid>
    <comment_count>4</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2022-09-19 16:37:43 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/4510</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1899693</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-09-19 19:14:14 -0700</bug_when>
    <thetext>Committed 254655@main (662e9f67690e): &lt;https://commits.webkit.org/254655@main&gt;

Reviewed commits have been landed. Closing PR #4510 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>