Open
Bug 1276058
Opened 8 years ago
Updated 2 years ago
Add static analysis check to ensure we use string converters properly
Categories
(Developer Infrastructure :: Source Code Analysis, defect)
Developer Infrastructure
Source Code Analysis
Tracking
(firefox49 affected)
NEW
Tracking | Status | |
---|---|---|
firefox49 | --- | affected |
People
(Reporter: mconley, Unassigned)
Details
See this comment:
https://dxr.mozilla.org/mozilla-central/rev/8d0aadfe7da782d415363880008b4ca027686137/xpcom/string/nsTPromiseFlatString.h#35
Not sure if this is something we should be able to catch with static analysis, but thought I'd file this to see.
Comment 1•8 years ago
|
||
We can probably capture this with the use of a basic borrow checking analysis. Something like
MOZ_BORROWS_THIS
on a method. This would then tell the analysis that the return value of the function should be destroyed before the `this` parameter to the method is destroyed.
It could start out as only having an effect if it is called on a temporary, and then be expanded to work in more complex situations in the future.
Updated•7 years ago
|
Product: Core → Firefox Build System
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•