<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 - OOM Assertion failure when Function constructor cannot create source string"
href="https://bugs.webkit.org/show_bug.cgi?id=158792">158792</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>OOM Assertion failure when Function constructor cannot create source string
</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@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>andre.bargull@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: !(length & is16BitStringFlag)
---
Test case:
---
var p = "a".repeat(0x7ffffff)
var r = Function(
p, p, p, p, p,
p, p, p, p, p,
p, p, p, p, p,
p, p, p, p, p
);
---
Stack trace:
---
#0 0x00007ffff6de7098 in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:317
#1 0x0000000000440c6c in WTF::StringView::initialize (this=0x7fffffffc4d0, characters=0x7ffc45c00014 "{function anonymous(", 'a' <repeats 180 times>...,
length=2684354603) at ../../Source/WTF/wtf/text/StringView.h:257
#2 0x0000000000440dd8 in WTF::StringView::StringView (this=0x7fffffffc4d0, string=...) at ../../Source/WTF/wtf/text/StringView.h:285
#3 0x0000000000441f7e in JSC::StringSourceProvider::source (this=0x7ffff0dece40) at ../../Source/JavaScriptCore/parser/SourceProvider.h:96
#4 0x00000000004420ae in JSC::SourceCode::SourceCode (this=0x7fffffffc660, provider=..., firstLine=1, startColumn=1)
at ../../Source/JavaScriptCore/parser/SourceCode.h:65
#5 0x00000000004422d0 in JSC::makeSource (source=..., url=..., startPosition=...) at ../../Source/JavaScriptCore/parser/SourceCode.h:124
#6 0x00007ffff6b60f1f in JSC::constructFunctionSkippingEvalEnabledCheck (exec=0x7fffffffca90, globalObject=0x7fffaf1e7900, args=..., functionName=..., sourceURL=...,
position=..., overrideLineNumber=-1, functionConstructionMode=JSC::FunctionConstructionMode::Function, newTarget=...)
at ../../Source/JavaScriptCore/runtime/FunctionConstructor.cpp:119
#7 0x00007ffff6b609fa in JSC::constructFunction (exec=0x7fffffffca90, globalObject=0x7fffaf1e7900, args=..., functionName=..., sourceURL=..., position=...,
functionConstructionMode=JSC::FunctionConstructionMode::Function, newTarget=...) at ../../Source/JavaScriptCore/runtime/FunctionConstructor.cpp:86
#8 0x00007ffff6b611ea in JSC::constructFunction (exec=0x7fffffffca90, globalObject=0x7fffaf1e7900, args=...,
functionConstructionMode=JSC::FunctionConstructionMode::Function, newTarget=...) at ../../Source/JavaScriptCore/runtime/FunctionConstructor.cpp:137
#9 0x00007ffff6b60900 in JSC::callFunctionConstructor (exec=0x7fffffffca90) at ../../Source/JavaScriptCore/runtime/FunctionConstructor.cpp:71
...
---</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>