Closed Bug 1129247 Opened 10 years ago Closed 10 years ago

Stop using full release-mode assertions for media invariants

Categories

(Core :: Audio/Video, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38
Tracking Status
firefox37 --- fixed
firefox38 --- fixed

People

(Reporter: bholley, Assigned: bholley)

References

Details

Attachments

(2 files)

The media code is racey, and our test coverage is poor - so CI doesn't give us a lot of confidence that our code is bug-free. As such, I've recently gotten into the habit of asserting certain invariants with release-mode assertions so that I can find bugs in the wild. This has worked quite well, but isn't a good long-term strategy - for most of these bugs, we'd still rather just be buggy than crash for release builds. This strategy only makes sense as a diagnostic on branches where we can rapidly deploy fixes (i.e. Nightly and Aurora). I'm going to add some infrastructure that lets us do that.
Attachment #8558868 - Flags: review?(jwalden+bmo)
Comment on attachment 8558868 [details] [diff] [review] Part 1 - Introduce MOZ_DIAGNOSTIC_ASSERT. v1 Review of attachment 8558868 [details] [diff] [review]: ----------------------------------------------------------------- ::: mfbt/Assertions.h @@ +387,5 @@ > > +#ifdef RELEASE_BUILD > +# define MOZ_DIAGNOSTIC_ASSERT(...) MOZ_ASSERT(__VA_ARGS__) > +#else > +# define MOZ_DIAGNOSTIC_ASSERT(...) MOZ_RELEASE_ASSERT(__VA_ARGS__) It's probably better to have these as # define MOZ_DIAGNOSTIC_ASSERT MOZ_ASSERT # define MOZ_DIAGNOSTIC_ASSERT MOZ_RELEASE_ASSERT so that we can worry less about possibly triggering MSVC's variadic macro bugs.
Attachment #8558868 - Flags: review?(jwalden+bmo) → review+
Attachment #8558870 - Flags: review?(matt.woodrow) → review+
Comment on attachment 8558870 [details] [diff] [review] Part 2 - Use MOZ_DIAGNOSTIC_ASSERT instead of MOZ_RELEASE_ASSERT in media code. v1 Approval request for both patchesaurora - we've got several of these assertions that we have fatal on all builds, and we want to make them non-fatal for beta and release. ~Zero risk.
Attachment #8558870 - Flags: approval-mozilla-aurora?
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Comment on attachment 8558868 [details] [diff] [review] Part 1 - Introduce MOZ_DIAGNOSTIC_ASSERT. v1 I agree with comment 5. These changes are also trivial. Aurora+
Attachment #8558868 - Flags: approval-mozilla-aurora+
Attachment #8558870 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
NB part two doesn't apply cleanly to aurora. I'm going through the backlog of changes which weren't critical for beta and preparing uplift requests.
Blocks: 1129523
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: