bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

_BitScanReverse does not modify `*pIndex` if input is zero

RESOLVED FIXED in Firefox 42

Status

()

Core
MFBT
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: jgilbert, Assigned: jgilbert)

Tracking

unspecified
mozilla42
Points:
---

Firefox Tracking Flags

(firefox42 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Created attachment 8631949 [details] [diff] [review]
0008-Handle-all-zero-_BitScanReverse.patch

MSVC code analysis complains about this.

https://msdn.microsoft.com/en-us/library/fbxyd7zd.aspx

_BitScanReverse doesn't modify `*pIndex` is the input is all zeros. We need to either test for this before-hand, or test the retval from _BitScanReverse, which is zero if input is zero. (non-zero otherwise)
Attachment #8631949 - Flags: review?(jwalden+bmo)

Updated

3 years ago
Attachment #8631949 - Flags: review?(jwalden+bmo) → review+
https://hg.mozilla.org/mozilla-central/rev/5b4a4d8e5a80
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox42: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.