WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 14132
array sort with > 10000 elements sets elements > 10000 undefined
https://bugs.webkit.org/show_bug.cgi?id=14132
Summary
array sort with > 10000 elements sets elements > 10000 undefined
Mitch Skinner
Reported
2007-06-13 18:46:51 PDT
Sorting arrays with more than 10,000 elements leaves elements beyond 10,000 undefined. Loading the attached html file in Safari 2 and 3 (419.3 on OS X 10.4.8 and 522.11.3 on Windows XP) gives me the following: Test Result test length: 10010 test[9999]: 9999 test[10000]: 10000 test[9990:10010]: [9990, 9991, 9992, 9993, 9994, 9995, 9996, 9997, 9998, 9999, 10000, 10001, 10002, 10003, 10004, 10005, 10006, 10007, 10008, 10009] sorting array test length: 10010 test[9999]: 9999 test[10000]: undefined test[9990:10010]: [9990, 9991, 9992, 9993, 9994, 9995, 9996, 9997, 9998, 9999, , , , , , , , , , ] While Firefox and IE both give me: Test Result test length: 10010 test[9999]: 9999 test[10000]: 10000 test[9990:10010]: [9990, 9991, 9992, 9993, 9994, 9995, 9996, 9997, 9998, 9999, 10000, 10001, 10002, 10003, 10004, 10005, 10006, 10007, 10008, 10009] sorting array test length: 10010 test[9999]: 9999 test[10000]: 10000 test[9990:10010]: [9990, 9991, 9992, 9993, 9994, 9995, 9996, 9997, 9998, 9999, 10000, 10001, 10002, 10003, 10004, 10005, 10006, 10007, 10008, 10009]
Attachments
test case
(1.51 KB, text/html)
2007-06-13 18:49 PDT
,
Mitch Skinner
no flags
Details
patch with test case and change log
(6.83 KB, patch)
2007-06-13 22:00 PDT
,
Darin Adler
mrowe
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Mitch Skinner
Comment 1
2007-06-13 18:49:53 PDT
Created
attachment 15012
[details]
test case
Mark Rowe (bdash)
Comment 2
2007-06-13 20:59:04 PDT
From memory, at around 10,000 elements we change both sorting algorithm and move to a sparse array implementation. Either one of these may be the root of this issue.
Mark Rowe (bdash)
Comment 3
2007-06-13 21:09:39 PDT
I'll have a look into this.
Darin Adler
Comment 4
2007-06-13 22:00:57 PDT
Created
attachment 15013
[details]
patch with test case and change log
Darin Adler
Comment 5
2007-06-13 22:09:48 PDT
Committed revision 23521.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug