Closed
Bug 1410186
Opened 7 years ago
Closed 7 years ago
make Maybe<> use release or diagnostic asserts for isSome() checks
Categories
(Core :: MFBT, enhancement)
Core
MFBT
Tracking
()
RESOLVED
FIXED
mozilla62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: bkelly, Assigned: froydnj)
References
Details
Attachments
(2 files)
(deleted),
patch
|
bkelly
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
Calls like Maybe<>::ref() current MOZ_ASSERT(isSome()) to make sure you're not referencing a non-existent object. We should probably convert these to release or diagnostic asserts.
Assignee | ||
Comment 1•7 years ago
|
||
We out-of-line the relevant functions because release assertions can
generate quite a bit of code, and we'd rather let the compiler determine
if these functions should be inlined now.
I am open to making these MOZ_DIAGNOSTIC_ASSERTs if we think that would be less
risky.
Attachment #8926909 -
Flags: review?(bkelly)
Reporter | ||
Comment 2•7 years ago
|
||
Comment on attachment 8926909 [details] [diff] [review]
turn Maybe assertions into release assertions
Review of attachment 8926909 [details] [diff] [review]:
-----------------------------------------------------------------
Thank you!
Attachment #8926909 -
Flags: review?(bkelly) → review+
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/15b89e515c94
turn Maybe assertions into release assertions; r=bkelly
Comment 4•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Updated•7 years ago
|
Assignee: nobody → nfroyd
Comment 5•7 years ago
|
||
backout |
https://hg.mozilla.org/integration/mozilla-inbound/rev/adfd4d3245467c54507316b9be82b86424585031
Backout 15b89e515c94 (bug 1410186) for causing too many crashes on Nightly.
Comment 6•7 years ago
|
||
I backed this out because it was working too well -- bug 1416344 was causing extremely high crash rates in Nightly.
bkelly, I believe froydnj will be on leave for some time. Would you like to take over this and ensure it gets relanded once bug 1416344 is fixed?
Flags: needinfo?(bkelly)
Reporter | ||
Comment 7•7 years ago
|
||
I don't have time to do much here. I personally think we should fix bug 1410186 and not back this out. Referencing uninitialized memory is not safe and hiding the crashes is not doing our users any favors.
Flags: needinfo?(bkelly)
Reporter | ||
Comment 8•7 years ago
|
||
I re-read that other bug and see the crash rates are higher than I would have thought last time I read it. We should definitely get that fixed before re-landing this.
Comment 9•7 years ago
|
||
backout uplift |
This missed the cut-off for Fx58 before the final merge to Beta, so I grafted the backout there as well.
https://hg.mozilla.org/releases/mozilla-beta/rev/b188777d8f972c4eb09aeb9471155751c29f62d6
Status: RESOLVED → REOPENED
status-firefox58:
fixed → ---
Resolution: FIXED → ---
Target Milestone: mozilla58 → ---
Comment 10•7 years ago
|
||
Merge of backout:
https://hg.mozilla.org/mozilla-central/rev/adfd4d324546
Assignee | ||
Comment 11•7 years ago
|
||
It turns out that several bits of a all-platforms try build fail with the
previous patch, because OptimizationInfo::CompilerWarmupThreshold doesn't
actually get assigned storage, and we need it to have storage for
Maybe::valueOr (which takes CompilerWarmupThreshold by reference). This patch
moves CompilerWarmupThreshold out of the class definition, which seems to solve
the issue.
I'll fold this into the previous patch before commit.
Attachment #8928039 -
Flags: review?(jdemooij)
Updated•7 years ago
|
Attachment #8928039 -
Flags: review?(jdemooij) → review+
Comment 12•7 years ago
|
||
Nathan, can we re-land these Maybe release assertions now that the trimmingPolicy bug 1416344 has been fixed?
Flags: needinfo?(nfroyd)
Assignee | ||
Comment 13•7 years ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #12)
> Nathan, can we re-land these Maybe release assertions now that the
> trimmingPolicy bug 1416344 has been fixed?
Sure, we could do that. Leaving ni? open to remind myself to put the patches back into landable shape.
Comment 14•7 years ago
|
||
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c82274a23aea
turn Maybe assertions into diagnostic assertions; r=bkelly
Assignee | ||
Comment 15•7 years ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #12)
> Nathan, can we re-land these Maybe release assertions now that the
> trimmingPolicy bug 1416344 has been fixed?
Relanded, but as MOZ_DIAGNOSTIC_ASSERT, so as to try to limit the performance impact on release.
Flags: needinfo?(nfroyd)
Comment 16•7 years ago
|
||
bugherder |
Status: REOPENED → RESOLVED
Closed: 7 years ago → 7 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Updated•7 years ago
|
Status: RESOLVED → REOPENED
status-firefox62:
fixed → ---
Resolution: FIXED → ---
Target Milestone: mozilla62 → ---
Comment 17•7 years ago
|
||
Backed out on request from igoldan. From IRC
igoldan> froydnj: bug 1410186 caused an increase in installer size
Flags: needinfo?(nfroyd)
Comment 18•7 years ago
|
||
Comment 19•7 years ago
|
||
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/aab1afd86d77
turn Maybe assertions into diagnostic assertions; r=bkelly
Assignee | ||
Comment 20•7 years ago
|
||
(In reply to Andreea Pavel [:apavel] from comment #17)
> Backed out on request from igoldan. From IRC
> igoldan> froydnj: bug 1410186 caused an increase in installer size
Yup, relanded since that bug is wontfix.
Flags: needinfo?(nfroyd)
Comment 21•7 years ago
|
||
bugherder |
Status: REOPENED → RESOLVED
Closed: 7 years ago → 7 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Comment 22•7 years ago
|
||
(In reply to Nathan Froyd [:froydnj] from comment #20)
> (In reply to Andreea Pavel [:apavel] from comment #17)
> > Backed out on request from igoldan. From IRC
> > igoldan> froydnj: bug 1410186 caused an increase in installer size
>
> Yup, relanded since that bug is wontfix.
That bug is this bug, I'm assuming you meant bug 1461934. This regressed libxul by 256k [1], but as noted it's nightly/beta only so unlikely to be fixed.
[1] https://treeherder.mozilla.org/perf.html#/graphs?timerange=7776000&series=mozilla-inbound,1299711,1,2&zoom=1526348067705.438,1526629766980.3625,126492537.31343284,133059701.49253732&selected=mozilla-inbound,1299711,337469,469582724,2
Updated•6 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•