Updating Miracleptr usage guidance (n.b. renderer code)

44 views
Skip to first unread message

Kalvin Lee

unread,
Oct 14, 2025, 11:33:23 AMOct 14
to cxx
Hi folks,

We at memory-safety-dev@ would like to propose an update to the style guide regarding MiraclePtr usage. (Googlers can also refer to this Google-internal thread for context.) We feel that this simply reflects already-common usage and should not be introducing anything surprising.

Note that the raw_ptr plugin already provides positive enforcement, even in renderer code ("you are not using raw_ptr, and you should be. Halt and catch fire").

Thanks,
Kalvin

Michael Lippautz

unread,
Oct 14, 2025, 2:06:19 PMOct 14
to Kalvin Lee, cxx
I realize you are trying to make the guidance more clear here but the example for `Member<T> garbage_collected` is incomplete/wrong and at the same time I am not sure it can and should be explained at this place.

Member pointers on naked structs require other annotations and I am not convinced that posting an incomplete example in such a prominent place is a good thing. At the same time these rules are not trivial and so they may raise more questions down the line.

Maybe it's enough to keep the prose text?

--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/cxx/f4423bbc-fe85-409d-b940-c6f7a74c3eban%40chromium.org.

Kalvin Lee

unread,
Oct 20, 2025, 11:16:31 AMOct 20
to cxx, Michael Lippautz, cxx
Thanks for the input. The reference to Member<T> garbage_collected; has been dropped in patchset 3.
Reply all
Reply to author
Forward
0 new messages