Closed Bug 1593203 Opened 5 years ago Closed 5 years ago

UBSan: load of value 228, which is not a valid value for type 'const bool' [@ mozilla::dom::MediaStateDebugInfo::ToObjectInternal]

Categories

(Core :: Audio/Video: Playback, defect, P2)

69 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox-esr68 --- unaffected
firefox70 --- wontfix
firefox71 --- wontfix
firefox72 --- fixed

People

(Reporter: pehrsons, Assigned: tarek)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

See https://treeherder.mozilla.org/#/jobs?repo=try&selectedJob=273989532&revision=61e3171ca18e457914b4230d59b25ce6f91b7d57

An error TEST-UNEXPECTED-FAIL | dom/media/test/test_playback.html | flac-sample.mp4 should not fire 'error' event NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004) - virtual mozilla::MediaResult mozilla::FFmpegAudioDecoder<46465650>::DoDecode(mozilla::MediaRawData *, uint8_t *, int, bool *, mozilla::MediaDataDecoder::DecodedData &): FFmpeg audio error:-1094995529 leads to a call to the privileged method HTMLMediaElement.mozRequestDebugInfo, which in a MozPromise resolve handlers hits this issue.

The resolve handler was written in bug 1542674.

The relevant log output is

[task 2019-10-31T22:44:47.455Z] 22:44:47 INFO - GECKO(2061) | /builds/worker/workspace/build/src/obj-firefox/dom/bindings/MediaDebugInfoBinding.cpp:2249:21: runtime error: load of value 228, which is not a valid value for type 'const bool'
[task 2019-10-31T22:44:47.940Z] 22:44:47 INFO - GECKO(2061) | #0 0x7f480768b813 in mozilla::dom::MediaStateDebugInfo::ToObjectInternal(JSContext*, JS::MutableHandle<JS::Value>) const /builds/worker/workspace/build/src/obj-firefox/dom/bindings/MediaDebugInfoBinding.cpp:2249:21
[task 2019-10-31T22:44:47.941Z] 22:44:47 INFO - GECKO(2061) | #1 0x7f480769ad7e in mozilla::dom::MediaFormatReaderDebugInfo::ToObjectInternal(JSContext*, JS::MutableHandle<JS::Value>) const /builds/worker/workspace/build/src/obj-firefox/dom/bindings/MediaDebugInfoBinding.cpp:3974:23
[task 2019-10-31T22:44:47.942Z] 22:44:47 INFO - GECKO(2061) | #2 0x7f48076af920 in mozilla::dom::MediaDecoderDebugInfo::ToObjectInternal(JSContext*, JS::MutableHandle<JS::Value>) const /builds/worker/workspace/build/src/obj-firefox/dom/bindings/MediaDebugInfoBinding.cpp:6115:23
[task 2019-10-31T22:44:47.943Z] 22:44:47 INFO - GECKO(2061) | #3 0x7f48076b28f1 in mozilla::dom::HTMLMediaElementDebugInfo::ToObjectInternal(JSContext*, JS::MutableHandle<JS::Value>) const /builds/worker/workspace/build/src/obj-firefox/dom/bindings/MediaDebugInfoBinding.cpp:6366:23
[task 2019-10-31T22:44:47.977Z] 22:44:47 INFO - GECKO(2061) | #4 0x7f4809f8d369 in ToJSValue<mozilla::dom::HTMLMediaElementDebugInfo> /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/dom/ToJSValue.h:252:20
[task 2019-10-31T22:44:47.979Z] 22:44:47 INFO - GECKO(2061) | #5 0x7f4809f8d369 in ToJSValue<mozilla::dom::HTMLMediaElementDebugInfo > /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/dom/ToJSValue.h:319:10
[task 2019-10-31T22:44:47.980Z] 22:44:47 INFO - GECKO(2061) | #6 0x7f4809f8d369 in MaybeSomething<mozilla::dom::HTMLMediaElementDebugInfo > /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/dom/Promise.h:298:10
[task 2019-10-31T22:44:47.981Z] 22:44:47 INFO - GECKO(2061) | #7 0x7f4809f8d369 in void mozilla::dom::Promise::MaybeResolve<mozilla::dom::HTMLMediaElementDebugInfo
>(mozilla::dom::HTMLMediaElementDebugInfo
&&) /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/dom/Promise.h:84:5
[task 2019-10-31T22:44:47.982Z] 22:44:47 INFO - GECKO(2061) | #8 0x7f480a00ba63 in operator() /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:1741:24
[task 2019-10-31T22:44:47.983Z] 22:44:47 INFO - GECKO(2061) | #9 0x7f480a00ba63 in InvokeMethod<(lambda at /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:1740:13), void ((lambda at /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:1740:13)::)() const, bool> /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/MozPromise.h:520:12
[task 2019-10-31T22:44:47.984Z] 22:44:47 INFO - GECKO(2061) | #10 0x7f480a00ba63 in InvokeCallbackMethod<false, (lambda at /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:1740:13), void ((lambda at /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:1740:13)::
)() const, bool, RefPtr<mozilla::MozPromise<bool, nsresult, true>::Private> > /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/MozPromise.h:544:5
[task 2019-10-31T22:44:47.986Z] 22:44:47 INFO - GECKO(2061) | #11 0x7f480a00ba63 in mozilla::MozPromise<bool, nsresult, true>::ThenValue<mozilla::dom::HTMLMediaElement::MozRequestDebugInfo(mozilla::ErrorResult&)::$_0, mozilla::dom::HTMLMediaElement::MozRequestDebugInfo(mozilla::ErrorResult&)::$_1>::DoResolveOrRejectInternal(mozilla::MozPromise<bool, nsresult, true>::ResolveOrRejectValue&) /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/MozPromise.h:726:9
[task 2019-10-31T22:44:47.990Z] 22:44:47 INFO - GECKO(2061) | #12 0x7f48054932a2 in mozilla::MozPromise<bool, nsresult, true>::ThenValueBase::ResolveOrRejectRunnable::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/MozPromise.h:402:21
[task 2019-10-31T22:44:47.990Z] 22:44:47 INFO - GECKO(2061) | #13 0x7f480358eef6 in mozilla::AutoTaskDispatcher::TaskGroupRunnable::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/TaskDispatcher.h:197:35
[task 2019-10-31T22:44:47.991Z] 22:44:47 INFO - GECKO(2061) | #14 0x7f480358b522 in mozilla::EventTargetWrapper::Runner::Run() /builds/worker/workspace/build/src/xpcom/threads/AbstractThread.cpp:113:25
[task 2019-10-31T22:44:47.992Z] 22:44:47 INFO - GECKO(2061) | #15 0x7f4803584cb1 in mozilla::SchedulerGroup::Runnable::Run() /builds/worker/workspace/build/src/xpcom/threads/SchedulerGroup.cpp:295:32
[task 2019-10-31T22:44:48.008Z] 22:44:48 INFO - GECKO(2061) | #16 0x7f48035b1d73 in nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1225:14
[task 2019-10-31T22:44:48.008Z] 22:44:48 INFO - GECKO(2061) | #17 0x7f48035b88d1 in NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:486:10

Tarek, can you take a look?

Flags: needinfo?(tarek)
Assignee: nobody → tarek
Flags: needinfo?(tarek)

I think it's because of an int/bool type mismatch, for mWaitingForKey or mWaitingForData

I will fix the type and run an ASAN try to see if that fixes it

mWaitingForKey and mWaitingForData are boolean values, not integers

Priority: -- → P2
Attachment #9106530 - Attachment description: Bug 1593203 - Fix type mistmatch r?pehrsons → Bug 1593203 - Make sure the debug structure is properly intialized r?pehrsons
Attachment #9106530 - Attachment description: Bug 1593203 - Make sure the debug structure is properly intialized r?pehrsons → Bug 1593203 - Proper initialization of nested dictionaries for MediaDebugInfo.webidl r?pehrsons
Attachment #9106530 - Attachment description: Bug 1593203 - Proper initialization of nested dictionaries for MediaDebugInfo.webidl r?pehrsons → Bug 1593203 - Proper initialization of nested dictionaries for MediaDebugInfo.webidl r?pehrsons,bz
Pushed by tziade@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a04cf95c417d
Proper initialization of nested dictionaries for MediaDebugInfo.webidl  r=pehrsons,bzbarsky
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72

Tarek, is that a patch you think we could safely uplift to 71 beta or should it ride the 72 train? Thanks

Flags: needinfo?(tarek)

I think it's safe to uplfit.

Flags: needinfo?(tarek)

We talked on IRC about it and there was no strong benefit for us to uplift in 71, we can let it ride the trains.

Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: