Closed Bug 1717318 Opened 4 years ago Closed 4 years ago

Crash with failed "@mozilla.org/peerconnection;1" instance (round 2)

Categories

(Core :: WebRTC: Networking, defect, P3)

defect

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox-esr78 --- wontfix
firefox-esr91 --- fixed
firefox91 --- wontfix
firefox92 --- wontfix
firefox93 --- fixed

People

(Reporter: Oriol, Assigned: bwc)

References

(Regression)

Details

(Keywords: crash, regression, testcase)

Crash Data

Attachments

(2 files)

Basically the same as bug 1550540. It regressed just some months after getting fixed.

Run this code in the browser console:

Cc["@mozilla.org/peerconnection;1"].createInstance(Ci.nsIArray)

Expected: it throws a JS exception like

[Exception... "ComponentManager::CreateInstance returned failure code:"  nsresult: "0x80570015 (NS_ERROR_XPC_CI_RETURNED_FAILURE)"  location: "JS frame :: debugger eval code :: <TOP_LEVEL> :: line 1"  data: no]

Result: Firefox crashes

AddressSanitizer:DEADLYSIGNAL

Regression window: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=49320c7fe8b3a547856dc67e7d57a64db6b56ffd&tochange=9e3f44e87a1a2be927c7fab135653c6b86b982c9

https://crash-stats.mozilla.org/report/index/a85a6b98-62d0-439b-af83-bbbae0210619
https://crash-stats.mozilla.org/report/index/a442a38f-2921-4c43-8b01-6a3a60210619

Basically,

NS_IMPL_COMPONENT_FACTORY(mozilla::PeerConnectionImpl) {
  return do_AddRef(new PeerConnectionImpl()).downcast<nsISupports>();
}

instantiates PeerConnectionImpl with a nullprt aGlobal.

But RTCStatsTimestampMaker::RTCStatsTimestampMaker assumes it's not null:

  nsCOMPtr<nsPIDOMWindowInner> window =
      do_QueryInterface(aGlobal->GetAsSupports());

So this was regressed by bug 1588588.

Crash Signature: [@ mozilla::dom::GlobalObject::GetAsSupports ]
Keywords: crash, testcase
Regressed by: 1588588
Has Regression Range: --- → yes
Assignee: nobody → docfaraday
Severity: -- → S3
Priority: -- → P3

Mochitest and wpt look fine, not sure about crashtest though. Here's a baseline push for comparison:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=4cefc1c3c5bf237cb20881b0d6d551a101f3be0b

Yeah, try looks the same as baseline.

Pushed by bcampen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b5c54bb33074 Test-case for bug. r=mjf https://hg.mozilla.org/integration/autoland/rev/d755daa2871c Stop PeerConnectionImpl from crashing if constructed with a null global. r=mjf
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch

Comment on attachment 9238687 [details]
Bug 1717318: Stop PeerConnectionImpl from crashing if constructed with a null global. r?mjf

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: This is a simple fix checking for a null ptr to avoid a crash.
  • User impact if declined: Possible crash in the wild.
  • Fix Landed on Version: 93
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Small number of changes (2 asserts and a null deref check).
  • String or UUID changes made by this patch: n/a
Attachment #9238687 - Flags: approval-mozilla-esr91?
Attachment #9238686 - Flags: approval-mozilla-esr91?

Comment on attachment 9238686 [details]
Bug 1717318: Test-case for bug. r?mjf

Approved for 91.4esr, thanks.

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

Attachment

General

Created:
Updated:
Size: