Closed Bug 1356063 Opened 3 years ago Closed 3 years ago

Maybe<T> lost MOZ_INHERIT_TYPE_ANNOTATIONS_FROM_TEMPLATE_ARGS

Categories

(Core :: MFBT, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: sfink, Assigned: sfink)

References

Details

Attachments

(1 file)

When bug 1287006 reverted Maybe from using AlignedStorage2, it lost the MOZ_INHERIT_TYPE_ANNOTATIONS_FROM_TEMPLATE_ARGS annotation. I'm not sure what effect that has on the static analyses, but I was planning on starting to use that annotation for the rooting hazard analysis.
(In reply to Steve Fink [:sfink] [:s:] from comment #0)
> When bug 1287006 reverted Maybe from using AlignedStorage2, it lost the
> MOZ_INHERIT_TYPE_ANNOTATIONS_FROM_TEMPLATE_ARGS annotation. I'm not sure
> what effect that has on the static analyses, but I was planning on starting
> to use that annotation for the rooting hazard analysis.

The effect which this has on the static analysis is a type T which has a custom type annotation (like MOZ_STACK_CLASS) will not have that annotation inherited by Maybe<T>, despite it containing an inline T.

This attribute should be re-added to Maybe<T>.
(In reply to Michael Layzell [:mystor] from comment #1)
> The effect which this has on the static analysis is a type T which has a
> custom type annotation (like MOZ_STACK_CLASS) will not have that annotation
> inherited by Maybe<T>, despite it containing an inline T.

Yeah, sorry, I know what the attribute does. I meant that I don't know what specific analyses depend on it, nor what they use it for. (I mean, I can guess for some of them.) But it doesn't matter. I just hit this because I intend to make the rooting hazard analysis pay attention to this attribute as well. That would have prevented a hazard from being missed recently. But then noticed that it wouldn't actually work right now due to this bug.

> This attribute should be re-added to Maybe<T>.

Yup.

I have a clean tree right now. I may as well just do it.
Assignee: nobody → sphink
Status: NEW → ASSIGNED
Attachment #8858079 - Flags: review?(michael) → review+
Pushed by sfink@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/054f46576d6d
Make Maybe<T> inherit static analysis annotations from T, r=mystor
https://hg.mozilla.org/mozilla-central/rev/054f46576d6d
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.