Add a check to clang-plugin identifying unsafe acquisitions of a raw pointer into a RefPtr
Categories
(Developer Infrastructure :: Source Code Analysis, task)
Tracking
(Not tracked)
People
(Reporter: sg, Assigned: sg)
Details
Attachments
(1 obsolete file)
A check should be added to clang-plugin identifying unsafe acquisitions of a raw pointer into a RefPtr
.
The cases which are most unsafe still need to be determined, e.g. acquiring a RefPtr
from a member raw pointer. These uses are not necessarily wrong, but should be made more explicit, e.g. by at least adding a do_addRef
rather than an implicit assignment.
The check needs to be made aware of the template instantiation stack to provide meaningful diagnostics.
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
I am not sure if this should be pursued anymore. We have added https://searchfox.org/mozilla-central/rev/4bb2401ecbfce89af06fb2b4d0ea3557682bd8ff/dom/indexedDB/SafeRefPtr.h to catch this better at the type level. Maybe static analysis can be picked up again in the future to amend this, but for now I am closing this issue.
Updated•3 years ago
|
Updated•2 years ago
|
Description
•