Closed Bug 1801270 Opened 1 year ago Closed 1 year ago

GetDiskInfo can return NS_OK without setting aResult

Categories

(Core :: XPCOM, defect)

defect

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox107 --- unaffected
firefox108 --- fixed
firefox109 --- fixed

People

(Reporter: valentin, Assigned: valentin)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

If we return NS_OK from this function, aResult should be set to the proper value.

Set release status flags based on info from the regressing bug 1746894

Since this a recent regression, did you want to get this landed and uplifted to fx108? FYI This is the last week of the beta cycle.

Flags: needinfo?(valentin.gosu)
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/09d3cd5772bf
Always set aResult when returning NS_OK from GetDiskInfo r=xpcom-reviewers,jstutte
https://hg.mozilla.org/integration/autoland/rev/7f729df6819e
Rename tentativeResult to statfsResult and quotaResult in nsLocalFile::GetDiskInfo r=jstutte
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
Flags: needinfo?(valentin.gosu)

The patch landed in nightly and beta is affected.
:valentin, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox108 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(valentin.gosu)

Comment on attachment 9304055 [details]
Bug 1801270 - Always set aResult when returning NS_OK from GetDiskInfo r=janv

Beta/Release Uplift Approval Request

  • User impact if declined: The error can only happen when the call to FillStatCache or GetDeviceName fail. In that case, we would return a wrong answer (uninitialized value) for nsLocalFile::GetDiskSpaceAvailable or nsLocalFile::GetDiskCapacity. The wrong values could lead us to assume that the disk is full, and keep evicting HTTP cache entries.
    The issue does not affect windows.
  • Is this code covered by automated tests?: Unknown
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The patches make sure we always return a valid result from GetDiskInfo.
  • String changes made/needed:
  • Is Android affected?: Yes
Flags: needinfo?(valentin.gosu)
Attachment #9304055 - Flags: approval-mozilla-beta?
Attachment #9305781 - Flags: approval-mozilla-beta?

Comment on attachment 9304055 [details]
Bug 1801270 - Always set aResult when returning NS_OK from GetDiskInfo r=janv

We are in RC week for 108

Attachment #9304055 - Flags: approval-mozilla-beta? → approval-mozilla-release?
Attachment #9305781 - Flags: approval-mozilla-beta? → approval-mozilla-release?

Comment on attachment 9304055 [details]
Bug 1801270 - Always set aResult when returning NS_OK from GetDiskInfo r=janv

Approved for 108.0rc2

Attachment #9304055 - Flags: approval-mozilla-release? → approval-mozilla-release+

Comment on attachment 9305781 [details]
Bug 1801270 - Rename tentativeResult to statfsResult and quotaResult in nsLocalFile::GetDiskInfo r=jstutte

Approved for 108.0rc2

Attachment #9305781 - Flags: approval-mozilla-release? → approval-mozilla-release+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: