Closed
Bug 555894
Opened 15 years ago
Closed 15 years ago
Don't use static strings when setting environment variables
Categories
(Toolkit Graveyard :: XULRunner, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.9.3a5
People
(Reporter: glandium, Assigned: glandium)
References
Details
Attachments
(1 file)
(deleted),
patch
|
vlad
:
review+
benjamin
:
superreview+
|
Details | Diff | Splinter Review |
(Not exactly a xulrunner issue, but one of the XRE)
On most unix systems, I think, "putting" an environment variable (as in putenv) just adds a reference to the string that was passed as an argument. When using heap allocated strings, it obviously can fail after free()ing, but in XRE case, it uses static strings. One could think this is okay, except these strings are in libxul.so, and libxul.so is dlclose()d when terminating.
On xulrunner builds of firefox, I was getting systematic segmentation faults when running firefox with an already opened window: the second instance would load libxul.so, send its xremote command, dlclose libxul.so then crash because the environment strings were now pointing to unmapped memory.
Assignee | ||
Updated•15 years ago
|
Attachment #435827 -
Attachment is patch: true
Attachment #435827 -
Attachment mime type: application/octet-stream → text/plain
Attachment #435827 -
Flags: review?(vladimir)
Attachment #435827 -
Flags: superreview?(benjamin)
Attachment #435827 -
Flags: review?(vladimir)
Attachment #435827 -
Flags: review+
Comment on attachment 435827 [details] [diff] [review]
Patch
looks fine to me, though would like :bs to sr this since it's in xre code
Updated•15 years ago
|
Attachment #435827 -
Flags: superreview?(benjamin) → superreview+
Assignee | ||
Updated•15 years ago
|
Keywords: checkin-needed
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → mh+mozilla
Assignee | ||
Updated•15 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
Updated•9 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•