<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Assertion failure or crash when accessing let-variable in TDZ with eval and AnnexB function block hoisting"
   href="https://bugs.webkit.org/show_bug.cgi?id=158796">158796</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failure or crash when accessing let-variable in TDZ with eval and AnnexB function block hoisting
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Local Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>JavaScriptCore
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>andre.bargull&#64;gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>SVN: rev202088
Build with: perl Tools/Scripts/build-jsc --gtk --debug


The following test case triggers this assertion error:
---
ASSERTION FAILED: returnValue
---


Test case:
---
{ let b = {a: eval(&quot;function b(){ return b; }&quot;), b: (1, eval)(&quot;(b())&quot;)}; }
---


Stack trace:
---
#0  0x00007ffff6de7098 in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:317
#1  0x00007ffff694c7dc in JSC::checkedReturn (returnValue=...) at ../../Source/JavaScriptCore/interpreter/Interpreter.cpp:809
#2  0x00007ffff694f249 in JSC::Interpreter::execute (this=0x7ffff0def058, eval=0x7fffaf1fbe50, callFrame=0x7fffffffcb00, thisValue=..., scope=0x7fffaf1dbfc0)
    at ../../Source/JavaScriptCore/interpreter/Interpreter.cpp:1237
#3  0x00007ffff6bd3d41 in JSC::globalFuncEval (exec=0x7fffffffcb00) at ../../Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:673
...
---


Alternative test case which crashes:
---
{ let {b} = {a: eval(&quot;function b(){ return b; }&quot;), b: (1, eval)(&quot;print(b())&quot;)}; }
---

Stack trace:
---
#0  0x0000000000448df0 in JSC::JSCell::isString (this=0x0) at ../../Source/JavaScriptCore/runtime/JSCellInlines.h:160
#1  0x0000000000449be6 in JSC::JSValue::isString (this=0x7fffffffbe50) at ../../Source/JavaScriptCore/runtime/JSCJSValueInlines.h:553
#2  0x00000000004445d8 in JSC::JSValue::toString (this=0x7fffffffbe50, exec=0x7fffffffbec0) at ../../Source/JavaScriptCore/runtime/JSString.h:765
#3  0x000000000043556f in functionPrint (exec=0x7fffffffbec0) at ../../Source/JavaScriptCore/jsc.cpp:1143
...
---</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>