| Summary: | r176455: ASSERT(!m_vector.isEmpty()) in IntendedStructureChain.cpp(143) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Michael Saboff <msaboff> | ||||
| Component: | JavaScriptCore | Assignee: | Michael Saboff <msaboff> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | ggaren, jimoase | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 139194 | ||||||
| Attachments: |
|
||||||
|
Description
Michael Saboff
2014-11-21 22:46:51 PST
Created attachment 242113 [details]
Patch
Committed r176506: <http://trac.webkit.org/changeset/176506> *** Bug 138772 has been marked as a duplicate of this bug. *** Comment on attachment 242113 [details]
Patch
Can you write a test for this? I think the test case here is more valuable than the patch, since this is code that changes a lot, and this mistake can easily be reintroduced.
It looks like the key to this bug is invoking tryBuildGetByIDList(), with an object whose prototype is explicitly null.
So, you can probably get this to happen by writing a test case where we repeatedly do an access, for three or four different structures, and each structure has a null prototype.
One way to get a null prototype is to explicitly set object.__proto__ = null.
var o1 = { __proto__: null, a: 0, b: 0 };
var o2 = { __proto__: null, a: 0, c: 0 };
var o3 = { __proto__: null, a: 0, d: 0 };
function access(o)
{
return o.a;
}
do a lot:
access(o1)
access(o2)
access(o3)
|