Closed
Bug 1277148
Opened 9 years ago
Closed 9 years ago
[Static Analysis][Logically dead code] numIfEnd==0 in CheckIf() never succeeds
Categories
(Core :: JavaScript Engine: JIT, defect)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla50
People
(Reporter: n.nethercote, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: CID 1358962)
Attachments
(1 file)
910 bytes,
patch
|
sunfish
:
review+
|
Details | Diff | Splinter Review |
Coverity detected that this code in CheckIf() never succeeds:
> if (numIfEnd == 0)
> return false;
because numIfEnd is initialized to 1 and then is only incremented after that.
sunfish, can you take a look? Maybe the test should just be removed, or maybe something bigger needs to be done.
Flags: needinfo?(sunfish)
Comment 1•9 years ago
|
||
For more context, this is in AsmJS.cpp. Probably testing for overflow? Could be rewritten to be made more explicit, I guess...
Comment 2•9 years ago
|
||
Flags: needinfo?(sunfish)
Attachment #8759088 -
Flags: review?(n.nethercote)
![]() |
Reporter | |
Comment 3•9 years ago
|
||
Comment on attachment 8759088 [details] [diff] [review]
overflow.patch
Review of attachment 8759088 [details] [diff] [review]:
-----------------------------------------------------------------
Your patch has r?sunfish in it but you asked me for review. I'm guessing you just typed the wrong name into the review request field...
Attachment #8759088 -
Flags: review?(n.nethercote) → review?(sunfish)
Comment 4•9 years ago
|
||
Comment on attachment 8759088 [details] [diff] [review]
overflow.patch
Review of attachment 8759088 [details] [diff] [review]:
-----------------------------------------------------------------
Yes, that code is testing for overflow. The proposed change looks ok.
Attachment #8759088 -
Flags: review?(sunfish) → review+
Pushed by bbouvier@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/55bd2af31d62
Make overflow testing more explicit in CheckIf; r=sunfish
Comment 6•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in
before you can comment on or make changes to this bug.
Description
•