Closed Bug 1278251 Opened 4 years ago Closed 4 years ago

[Static Analysis][Assign instead of compare] In function CodeGeneratorX64::loadSimd

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox49 --- affected
firefox50 --- fixed

People

(Reporter: andi, Assigned: andi)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: CID 1362532)

Attachments

(1 file)

The Static Analysis tool Coverity detected that an assignment operation is performed instead of comparison:


>>      case Scalar::Int8x16:
>>        MOZ_ASSERT(numElems = 16, "unexpected partial load");
>>        masm.loadUnalignedSimd128Int(srcAddr, out);
>>        break;
>>      case Scalar::Int16x8:
>>        MOZ_ASSERT(numElems = 8, "unexpected partial load");
>>        masm.loadUnalignedSimd128Int(srcAddr, out);
>>        break; 

In this way the two assertion become useless.
Comment on attachment 8760272 [details]
Bug 1278251 - corrected assign instead of compare.

https://reviewboard.mozilla.org/r/57912/#review54772

Stealing as it's trivial. Thanks for the fix.
Attachment #8760272 - Flags: review?(jdemooij)
Pushed by Bogdan.Postelnicu@softvision.ro:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c089327950e6
corrected assign instead of compare. r=bbouvier
https://hg.mozilla.org/mozilla-central/rev/c089327950e6
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.