Closed Bug 328556 Opened 20 years ago Closed 20 years ago

Assertion failure: growth == (size_t)-1 || (nchars + 1) * sizeof(jschar) == growth, at js/src/jsarray.c:591

Categories

(Core :: JavaScript Engine, defect)

PowerPC
macOS
defect
Not set
critical

Tracking

()

VERIFIED FIXED

People

(Reporter: jruderman, Assigned: igor)

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

Assertion failure: growth == (size_t)-1 || (nchars + 1) * sizeof(jschar) == growth, at /Users/admin/trunk/mozilla/js/src/jsarray.c:591
Attached file testcase
This is probably a regression from bug 311583.
Attached patch FixSplinter Review
This is indeed a regression caused by my changes for bug 311583 but it also exposes the problem with MarkSharpObjects which enumerates over all properties while array_join_sub would go only over indexes. Thus js_EnterSharpObject would report about "#1=" prefix but which the regression did not account properly.
Assignee: general → igor.bukanov
Status: NEW → ASSIGNED
Attachment #213327 - Flags: review?(mrbkap)
That bad accounting that the patch from above fixes triggers the assert only when array_join_sub would not loop over any entries while MarkSharpObjects consider that there are cycles in the object graph. Moreover, it influences only the assert and nothing else. I.e. it should not affect any build where assertions are turned off effectively removing the bug.
Comment on attachment 213327 [details] [diff] [review] Fix r=mrbkap
Attachment #213327 - Flags: review?(mrbkap) → review+
I filed bug 328745 about erroneous sharping in cases like from the above example.
I committed the fix
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Checking in regress-328556.js; /cvsroot/mozilla/js/tests/js1_5/Array/regress-328556.js,v <-- regress-328556.js initial revision: 1.1
Flags: in-testsuite+
verified fixed trunk 20060328 win/mac/linux
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: