Closed Bug 477604 Opened 16 years ago Closed 16 years ago

Array.concat causes ArrayIndexOutOfBoundException with non dense array

Categories

(Rhino Graveyard :: Core, defect)

x86
Linux
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mguillemot, Assigned: norrisboyd)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/2008121621 Ubuntu/8.04 (hardy) Firefox/3.0.5 Build Identifier: everything is in the title and in "Steps to Reproduce". I'll attach the fix as a patch. Reproducible: Always Steps to Reproduce: var a = ['a0', 'a1']; a[3] = 'a3'; var b = ['b1', 'b2']; b.concat(a)";
Assignee: nobody → norrisboyd
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Doesn't work for function myarray() { } myarray.prototype = Array.prototype; var c = new myarray(); c[0] = 'c0'; c[1] = 'c1'; c[3] = 'c3'; c.length = 4; b.concat(c); I'll fix.
I agree: my patch doesn't fix the problem illustrated in your example (but it doesn't introduce this problem). I wouldn't be surprised if Array.concat has other problems.
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Thanks Norris for the very quick fix. For info, #452993 reports a problem in Array.concat as well but it seems to me to be invalid (or it has been fixed as side effect of some other change).
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: