Closed Bug 455216 Opened 16 years ago Closed 15 years ago

Crash with nsTArray.InsertElementAt(Length() + 1)

Categories

(Core :: XPCOM, defect)

defect
Not set
critical

Tracking

()

RESOLVED INVALID

People

(Reporter: WeirdAl, Unassigned)

Details

(Keywords: crash, testcase)

Attachments

(2 files)

When I apply the following patch to xpcom/tests/TestTArray.cpp, it causes a crash.  Stack trace coming up.
Attached file stack trace
I suspect we start running into trouble in ReplaceElementsAt, which currently doesn't check the start argument when calling EnsureCapacity.
It makes sense to InsertElementAt(Length()) which would insert it at the last position. I don't see how it makes any sense to do it at Length() + 1
don't see any stack signatures like this in recent crash data.

is this still a problem that we want to track and address as some kind of defense in depth, or does the test case just not make sense?
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: