<?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>208766</bug_id>
          
          <creation_ts>2020-03-07 10:16:46 -0800</creation_ts>
          <short_desc>REGRESSION (r258049): Unchecked JS exception in jsc::Stringifier::toJSON</short_desc>
          <delta_ts>2020-03-07 14:54:15 -0800</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 Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=208725</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Trivial</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ryan Haddad">ryanhaddad</reporter>
          <assigned_to name="Alexey Shvayka">ashvayka</assigned_to>
          <cc>ashvayka</cc>
    
    <cc>commit-queue</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>keith_miller</cc>
    
    <cc>mark.lam</cc>
    
    <cc>msaboff</cc>
    
    <cc>ross.kirsling</cc>
    
    <cc>saam</cc>
    
    <cc>tzagallo</cc>
    
    <cc>webkit-bot-watchers-bugzilla</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1627235</commentid>
    <comment_count>0</comment_count>
    <who name="Ryan Haddad">ryanhaddad</who>
    <bug_when>2020-03-07 10:16:46 -0800</bug_when>
    <thetext>After https://trac.webkit.org/changeset/258049/webkit, the debug JSC bit has 44 test failures due to an unchecked JS exception:

microbenchmarks/json-stringify-many-objects-to-json.js.default: ERROR: Unchecked JS exception:
microbenchmarks/json-stringify-many-objects-to-json.js.default:     This scope can throw a JS exception: executeCall @ ./interpreter/Interpreter.cpp:858
microbenchmarks/json-stringify-many-objects-to-json.js.default:         (ExceptionScope::m_recursionDepth was 10)
microbenchmarks/json-stringify-many-objects-to-json.js.default:     But the exception was unchecked as of this scope: toJSON @ ./runtime/JSONObject.cpp:301
microbenchmarks/json-stringify-many-objects-to-json.js.default:         (ExceptionScope::m_recursionDepth was 9)
microbenchmarks/json-stringify-many-objects-to-json.js.default: 
microbenchmarks/json-stringify-many-objects-to-json.js.default: Unchecked exception detected at:
microbenchmarks/json-stringify-many-objects-to-json.js.default:     1   0x10b9c30ae JSC::VM::verifyExceptionCheckNeedIsSatisfied(unsigned int, JSC::ExceptionEventLocation&amp;)
microbenchmarks/json-stringify-many-objects-to-json.js.default:     2   0x10b99beed JSC::ThrowScope::~ThrowScope()
microbenchmarks/json-stringify-many-objects-to-json.js.default:     3   0x10b99c0f5 JSC::ThrowScope::~ThrowScope()
microbenchmarks/json-stringify-many-objects-to-json.js.default:     4   0x10b80713c JSC::Stringifier::toJSON(JSC::JSValue, JSC::PropertyNameForFunctionCall const&amp;)
microbenchmarks/json-stringify-many-objects-to-json.js.default:     5   0x10b8063b9 JSC::Stringifier::appendStringifiedValue(WTF::StringBuilder&amp;, JSC::JSValue, JSC::Stringifier::Holder const&amp;, JSC::PropertyNameForFunctionCall const&amp;)
microbenchmarks/json-stringify-many-objects-to-json.js.default:     6   0x10b807efa JSC::Stringifier::Holder::appendNextProperty(JSC::Stringifier&amp;, WTF::StringBuilder&amp;)
microbenchmarks/json-stringify-many-objects-to-json.js.default:     7   0x10b806cd5 JSC::Stringifier::appendStringifiedValue(WTF::StringBuilder&amp;, JSC::JSValue, JSC::Stringifier::Holder const&amp;, JSC::PropertyNameForFunctionCall const&amp;)
microbenchmarks/json-stringify-many-objects-to-json.js.default:     8   0x10b80608c JSC::Stringifier::stringify(JSC::JSValue)
microbenchmarks/json-stringify-many-objects-to-json.js.default:     9   0x10b80b568 JSC::JSONProtoFuncStringify(JSC::JSGlobalObject*, JSC::CallFrame*)
microbenchmarks/json-stringify-many-objects-to-json.js.default:     10  0x547503e01178
microbenchmarks/json-stringify-many-objects-to-json.js.default:     11  0x10a4faeb3 llint_entry
microbenchmarks/json-stringify-many-objects-to-json.js.default:     12  0x10a4dda93 vmEntryToJavaScript
microbenchmarks/json-stringify-many-objects-to-json.js.default:     13  0x10b2ecf57 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*)
microbenchmarks/json-stringify-many-objects-to-json.js.default:     14  0x10b2ec5ac JSC::Interpreter::executeProgram(JSC::SourceCode const&amp;, JSC::JSGlobalObject*, JSC::JSObject*)
microbenchmarks/json-stringify-many-objects-to-json.js.default:     15  0x10b671edc JSC::evaluate(JSC::JSGlobalObject*, JSC::SourceCode const&amp;, JSC::JSValue, WTF::NakedPtr&lt;JSC::Exception&gt;&amp;)
microbenchmarks/json-stringify-many-objects-to-json.js.default:     16  0x109eade4f runWithOptions(GlobalObject*, CommandLine&amp;, bool&amp;)
microbenchmarks/json-stringify-many-objects-to-json.js.default:     17  0x109e7f19a jscmain(int, char**)::$_6::operator()(JSC::VM&amp;, GlobalObject*, bool&amp;) const
microbenchmarks/json-stringify-many-objects-to-json.js.default:     18  0x109e5997b int runJSC&lt;jscmain(int, char**)::$_6&gt;(CommandLine const&amp;, bool, jscmain(int, char**)::$_6 const&amp;)
microbenchmarks/json-stringify-many-objects-to-json.js.default:     19  0x109e58408 jscmain(int, char**)
microbenchmarks/json-stringify-many-objects-to-json.js.default:     20  0x109e581de main
microbenchmarks/json-stringify-many-objects-to-json.js.default:     21  0x7fff719c87fd start

https://build.webkit.org/builders/Apple-Catalina-Debug-JSC-Tests/builds/453</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1627243</commentid>
    <comment_count>1</comment_count>
      <attachid>392867</attachid>
    <who name="Alexey Shvayka">ashvayka</who>
    <bug_when>2020-03-07 10:53:08 -0800</bug_when>
    <thetext>Created attachment 392867
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1627314</commentid>
    <comment_count>2</comment_count>
      <attachid>392867</attachid>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2020-03-07 14:09:41 -0800</bug_when>
    <thetext>Comment on attachment 392867
Patch

r=me, nice fix!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1627318</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Kirsling">ross.kirsling</who>
    <bug_when>2020-03-07 14:29:02 -0800</bug_when>
    <thetext>Thanks for addressing this so quickly, Alexey!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1627319</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Shvayka">ashvayka</who>
    <bug_when>2020-03-07 14:46:23 -0800</bug_when>
    <thetext>Thank you, folks.
I thought this kind of errors would have been caught by regular EWS.
Anyway, I will test future patches with JSC_validateExceptionChecks=true.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1627322</commentid>
    <comment_count>5</comment_count>
      <attachid>392867</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2020-03-07 14:53:43 -0800</bug_when>
    <thetext>Comment on attachment 392867
Patch

Clearing flags on attachment: 392867

Committed r258081: &lt;https://trac.webkit.org/changeset/258081&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1627323</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2020-03-07 14:53:45 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1627324</commentid>
    <comment_count>7</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-03-07 14:54:15 -0800</bug_when>
    <thetext>&lt;rdar://problem/60192817&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>392867</attachid>
            <date>2020-03-07 10:53:08 -0800</date>
            <delta_ts>2020-03-07 14:53:43 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-208766-20200307205307.patch</filename>
            <type>text/plain</type>
            <size>1490</size>
            <attacher name="Alexey Shvayka">ashvayka</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291
cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkocmV2aXNpb24gMjU4MDc1KQorKysgU291cmNl
L0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDEzIEBA
CisyMDIwLTAzLTA3ICBBbGV4ZXkgU2h2YXlrYSAgPHNodmFpa2FsZXNoQGdtYWlsLmNvbT4KKwor
ICAgICAgICBSRUdSRVNTSU9OIChyMjU4MDQ5KTogVW5jaGVja2VkIEpTIGV4Y2VwdGlvbiBpbiBq
c2M6OlN0cmluZ2lmaWVyOjp0b0pTT04KKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcv
c2hvd19idWcuY2dpP2lkPTIwODc2NgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09Q
UyEpLgorCisgICAgICAgICogcnVudGltZS9KU09OT2JqZWN0LmNwcDoKKyAgICAgICAgKEpTQzo6
U3RyaW5naWZpZXI6OnRvSlNPTik6IEFkZCBtaXNzaW5nIFJFTEVBU0VfQU5EX1JFVFVSTi4KKwog
MjAyMC0wMy0wNiAgWXVzdWtlIFN1enVraSAgPHlzdXp1a2lAYXB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