Open
Bug 1111288
Opened 10 years ago
Updated 2 years ago
a potential memory leak - caused by forgetting to free after realloc failure
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
UNCONFIRMED
People
(Reporter: yxcynthia, Unassigned)
References
Details
(Keywords: memory-leak)
Attachments
(1 file)
387.66 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Steps to reproduce: run cppcheck on mozilla-central/js/src/editline/editline.c Actual results: on line 153: 'screen' nulled but not freed upon failure Expected results: the 'screen' should be freed if the 'RENEW' fails, but not handled in the code
Updated•10 years ago
|
Comment 1•10 years ago
|
||
I think we can just use moz_xrealloc in RENEW to make this realloc infallible.
Comment 2•10 years ago
|
||
> I think we can just use moz_xrealloc in RENEW to make this realloc
> infallible.
Not within Spidermonkey, unfortunately. But we can make RENEW call MOZ_CRASH() on failure.
I'm pretty sure this code is only used in the JS shell, not the browser, which reduces the priority a little.
Updated•10 years ago
|
Assignee: nobody → n.nethercote
Updated•9 years ago
|
Assignee: n.nethercote → nobody
Updated•9 years ago
|
Flags: needinfo?(jorendorff)
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•