Closed
Bug 2079751
Opened 1 month ago
Closed 1 month ago
Clamp the MOZ_LOG rotate and maxsize sizes
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
160 Branch
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: dcarver, Assigned: dcarver)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
LogModuleManager::Init converts the rotate and maxsize megabytes to bytes on 32 bits, so large or negative values wrap around silently: rotate:4096 disables rotation, rotate:-5 rotates files of about 1 GiB, and maxsize:2048 is ignored.
| Assignee | ||
Updated•1 month ago
|
Assignee: nobody → dcarver
Status: NEW → ASSIGNED
| Assignee | ||
Comment 1•1 month ago
|
||
The megabytes were converted to bytes on 32 bits, so large or negative values
wrapped around silently. Large values are now clamped to 2047 MB so that the
sizes fit in an int32_t, and negative values disable the option, as values
that overflow an int32_t already did in the MOZ_LOG parser.
Using an int64_t would require replacing ftell(), which returns a 32-bit long
on Windows and on 32-bit platforms.
Pushed by dcarver@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/4b277307bd43
https://hg.mozilla.org/integration/autoland/rev/30a0066e59b6
Clamp the MOZ_LOG rotate and maxsize sizes. r=xpcom-reviewers,nika
Comment 3•1 month ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
status-firefox160:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•