Closed
Bug 735278
Opened 13 years ago
Closed 12 years ago
Linker doesn't call fini_array function in reverse order of those of init_array
Categories
(Core :: mozglue, defect)
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: glandium, Assigned: glandium)
Details
Attachments
(1 file, 1 obsolete file)
3.13 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #629776 -
Flags: review?(nfroyd)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → mh+mozilla
Comment 2•12 years ago
|
||
Comment on attachment 629776 [details] [diff] [review]
Call destructors in reverse order of initializers in the linker
Review of attachment 629776 [details] [diff] [review]:
-----------------------------------------------------------------
::: mozglue/linker/Utils.h
@@ +536,5 @@
> + * Returns a reverse iterator pointing past the beginning of the Array
> + */
> + reverse_iterator rend() const {
> + if (length)
> + return reverse_iterator(UnsizedArray<T>::operator[](-1));
I don't like this because it screws with bounds checking (which I realize is unimplemented, and we don't run static analyses for it) and also because I'm fairly certain that the ultimate effect of this produces undefined behavior according to the standard. (Pointers just past the end of an object are OK; pointers before the beginning of an object are not.) Rewrite to avoid this, please.
Attachment #629776 -
Flags: review?(nfroyd) → review-
Assignee | ||
Comment 3•12 years ago
|
||
I also slipped a fix to the operator++ return type.
Attachment #630102 -
Flags: review?(nfroyd)
Assignee | ||
Updated•12 years ago
|
Attachment #629776 -
Attachment is obsolete: true
Updated•12 years ago
|
Attachment #630102 -
Flags: review?(nfroyd) → review+
Assignee | ||
Comment 4•12 years ago
|
||
Target Milestone: --- → mozilla16
Comment 5•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•