Closed Bug 629391 Opened 14 years ago Closed 14 years ago

GC delete operator should be resilient to NULL

Categories

(Tamarin Graveyard :: Garbage Collection (mmGC), defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Q3 11 - Serrano

People

(Reporter: treilly, Assigned: treilly)

References

Details

Attachments

(1 file)

It currently calls FreeNotNull which seems wrong, unless the C++ compiler generates the NULL check?
IMO operator delete should not be resilient to NULL, because GC::Free is not allowed on a NULL pointer by long-standing tradition.
(In reply to comment #1) > IMO operator delete should not be resilient to NULL, because GC::Free is not > allowed on a NULL pointer by long-standing tradition. Actually that's a ludicrous claim. Anyway: I thought the delete operator would only be invoked on non-NULL pointers and I thought I checked that when I wrote the code. But I've not yet found prose in the C++ spec to back me up on that.
The compiler does not do a NULL check and the default delete operator handles NULL.
Blocks: 615490
C++ operator delete explicitly allows NULL pointers, so any "delete" we offer should probably do so as well, to re-use brainprint.
Status: NEW → ASSIGNED
Ruchi needs this to complete her audit changes.
Assignee: nobody → treilly
Attachment #508769 - Flags: review?(lhansen)
Attachment #508769 - Flags: review?(lhansen) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
changeset: 5859:485ac738ec90 user: Tommy Reilly <treilly@adobe.com> summary: [Bug 629391] GC delete operator should be resilient to NULL (r=lhansen) http://hg.mozilla.org/tamarin-redux/rev/485ac738ec90
Flags: flashplayer-bug+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: