Closed
Bug 1534421
Opened 6 years ago
Closed 6 years ago
Make the CAN_RUN_SCRIPT analysis treat dereferences of pointer-typed args of CAN_RUN_SCRIPT functions as live
Categories
(Developer Infrastructure :: Source Code Analysis, enhancement)
Developer Infrastructure
Source Code Analysis
Tracking
(firefox67 fixed)
RESOLVED
FIXED
mozilla67
| Tracking | Status | |
|---|---|---|
| firefox67 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
Details
Attachments
(2 files)
|
2.20 KB,
patch
|
Details | Diff | Splinter Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review |
Consider this case:
MOZ_CAN_RUN_SCRIPT
void foo(Arg& arg) {}
MOZ_CAN_RUN_SCRIPT
void bar(Arg* arg) {
foo(*arg);
}
ideally this would pass the analysis. Right now it doesn't, and my attempt to fix the analysis to allow it doesn't seem to work: the unaryDereferenceOperator() does match, but the hasUnaryOperand(declRefExpr()) bit does not (even if I take out the to(...) bits).
Flags: needinfo?(bpostelnicu)
| Assignee | ||
Comment 1•6 years ago
|
||
I found the clang analysis docs. This all makes a lot more sense now. ;)
Assignee: nobody → bzbarsky
Flags: needinfo?(bpostelnicu)
| Assignee | ||
Comment 2•6 years ago
|
||
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f65aaa2a97bb
Fix the CAN_RUN_SCRIPT analysis to treat a deref of an arg as live if it would treat the arg as live. r=andi
Comment 4•6 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox67:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Updated•3 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•