Crash in [@ mozilla::CheckedInt<T>::value | mozilla::media::TimeUnit::operator<=]
Categories
(Core :: Audio/Video: Playback, defect)
Tracking
()
People
(Reporter: clouseau-bot, Unassigned, NeedInfo)
References
(Blocks 1 open bug)
Details
(Keywords: crash)
Crash Data
Crash report: https://crash-stats.mozilla.org/report/index/521f048b-19b3-49f8-b81e-d383f0260917
MOZ_CRASH Reason:
MOZ_RELEASE_ASSERT(mIsValid) (Invalid checked integer (division by zero or integer overflow))
Top 10 frames:
0 XUL mozilla::media::TimeUnit::operator<=(mozilla::media::TimeUnit const&) const dom/media/TimeUnits.cpp:235
1 XUL mozilla::media::Interval<mozilla::media::TimeUnit>::TouchesOnRight(mozilla::medi... dom/media/Intervals.h:219
2 XUL mozilla::media::IntervalSet<mozilla::media::TimeUnit>::Add(mozilla::media::Inter... dom/media/Intervals.h:330
3 XUL mozilla::media::TimeIntervals::ToMicrosecondResolution() const dom/media/TimeUnits.h:324
4 XUL mozilla::dom::SourceBuffer::GetBuffered(mozilla::ErrorResult&) dom/media/mediasource/SourceBuffer.cpp:136
5 XUL mozilla::dom::SourceBuffer_Binding::get_buffered(JSContext*, JS::Handle<JSObject... dom/bindings/SourceBufferBinding.cpp:194
6
7
8
9
There are 88 crashes (from 66 installations) in 155.0.1 starting with buildid 20260903215306.
This signature has been reported since build 20260514160037 (2026-05-14), 112 days before the build above.
This bug looks actionable because:
mozilla::media::TimeUnit::ToBase()(dom/media/TimeUnits.h:233-236) returns a deliberately-poisonedTimeUnit::Invalid()when a base conversion overflows its double-precision fallback;mozilla::media::TimeIntervals::ToMicrosecondResolution()(dom/media/TimeUnits.h:317-327), called frommozilla::dom::SourceBuffer::GetBuffered, merges that result into its outputIntervalSetviaoperator+=without checkingIsValid(). The poisoned value is later compared inmozilla::media::Interval::TouchesOnRight()(dom/media/Intervals.h:219, matching crash frame #1 exactly) throughmozilla::media::TimeUnit::operator<=()(dom/media/TimeUnits.cpp:232-235), whose own validity guard is a debug-onlyMOZ_ASSERTthat is compiled out in release, letting execution reachmozilla::CheckedInt<int64_t>::value()'sMOZ_RELEASE_ASSERT(mIsValid, "Invalid checked integer (division by zero or integer overflow)")(mfbt/CheckedInt.h:323-326), which is the exact fault observed.- Crash frame #1 lands on
Intervals.h:219— the plainaOther.mStart <= mStartcomparison — rather than the fuzz-arithmetic lines 220/221, consistent with an already-invalidated storedTimeUnitenteringTouchesOnRightrather than a fresh overflow computed inside it. Frame #3'sToMicrosecondResolution()…[inlined operator+=]matchesoutput += reducedPrecisionatTimeUnits.h:324exactly, and frame #4 (SourceBuffer::GetBuffered,SourceBuffer.cpp:136) is the sole caller ofToMicrosecondResolution()in this path. This signature is 112 days old with no version-over-version rate step in the 60-day window and negligible hardware/bit-flip share, so it is a pre-existing software defect, not something this build's pushlog window introduced. - The failing code comes from ca9a94f33590 (bug 1817997) by :padenot.
Code references:
- mozilla::media::TimeUnit::ToBase
- mozilla::media::Interval::TouchesOnRight
- mozilla::CheckedInt::value
- mozilla::dom::SourceBuffer::GetBuffered
:padenot, can you have a look please?
Filed automatically by Clouseau, which analyses release crashes with an LLM. Nothing above was written or checked by a human. Please close it as INVALID if it is wrong — that is useful feedback, not a nuisance.
This is not an independent Mozilla discovery: the crash is known here only because somebody submitted the crash report linked at the top. If this duplicates an existing report, please resolve THIS bug as the duplicate and leave the credit with the earlier reporter.
Comment 1•1 month ago
|
||
This is the same crash as bug 2056822. The stack is identical: SourceBuffer::GetBuffered -> TimeIntervals::ToMicrosecondResolution() -> IntervalSet::Add -> Interval::TouchesOnRight -> TimeUnit::operator<=, which trips MOZ_RELEASE_ASSERT(mIsValid). Only the signature is different, because the symbolication of the comparison operator is different.
Bug 2056822 comment 1 already has the root cause. Since bug 2014895, TimeUnit::ToBase() returns TimeUnit::Invalid() on overflow, and ToMicrosecondResolution() stores that result without an IsValid() check. We mark this bug as a duplicate, so that one bug tracks all the crash volume. The signature of this bug should go into the crash signature field of bug 2056822.
Description
•