Closed
Bug 1360152
Opened 9 years ago
Closed 9 years ago
[Static Analysis][Coverity] /js/src/jsopcode.cpp: 1189 Execution cannot reach this statement: "js::ReportOutOfMemory(cx);".
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla55
| Tracking | Status | |
|---|---|---|
| firefox55 | --- | fixed |
People
(Reporter: kanru, Assigned: tromey)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: CID 1405540)
Attachments
(1 file)
The change in bug 1334278 changed the return value JS_smprintf to UniqueChars but didn't remove this OOM check:
*** CID 1405540: Control flow issues (DEADCODE)
/js/src/jsopcode.cpp: 1189 in ToDisassemblySource(JSContext *, JS::Handle<JS::Value>, JSAutoByteString *)()
1183 return false;
1184 char* nbytes = QuoteString(&sprinter, v.toString(), '"');
1185 if (!nbytes)
1186 return false;
1187 UniqueChars copy = JS_smprintf("%s", nbytes);
1188 if (!nbytes) {
>>> CID 1405540: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "js::ReportOutOfMemory(cx);".
1189 ReportOutOfMemory(cx);
1190 return false;
1191 }
1192 bytes->initBytes(Move(copy));
1193 return true;
1194 }
If the OOM report is still need we should change it to |if (!copy)|
Flags: needinfo?(ttromey)
| Reporter | ||
Updated•9 years ago
|
Blocks: coverity-analysis
Whiteboard: CID 1405540
| Comment hidden (mozreview-request) |
Comment 3•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8862431 [details]
Bug 1360152 - null-check correct value in ToDisassemblySource;
https://reviewboard.mozilla.org/r/134362/#review137310
Doh!
Attachment #8862431 -
Flags: review?(nfroyd) → review+
Comment 4•9 years ago
|
||
| mozreview-review-reply | ||
Comment on attachment 8862431 [details]
Bug 1360152 - null-check correct value in ToDisassemblySource;
https://reviewboard.mozilla.org/r/134362/#review137310
We may want to consider uplifting this if appropriate.
Updated•9 years ago
|
status-firefox55:
--- → affected
status-firefox57:
affected → ---
Pushed by ttromey@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5a2d5f57d453
null-check correct value in ToDisassemblySource; r=froydnj
Comment 6•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•