Closed
Bug 1398785
Opened 7 years ago
Closed 7 years ago
[Static Analysis][Coverity] Kill structurally dead code in NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN
Categories
(Developer Infrastructure :: Source Code Analysis, defect)
Developer Infrastructure
Source Code Analysis
Tracking
(firefox57 fixed)
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: andi, Assigned: andi)
References
(Blocks 1 open bug)
Details
(Keywords: coverity)
Attachments
(1 file)
Suppress structurally dead code generated by Coverity in NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN, by modifying the modelling file.
Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
did you try if it is working?
Assignee | ||
Comment 3•7 years ago
|
||
(In reply to Sylvestre Ledru [:sylvestre] from comment #2)
> did you try if it is working?
It eliminated one issue 2 month ago. But i haven't updated the version from m-c.
Comment 4•7 years ago
|
||
mozreview-review |
Comment on attachment 8906929 [details]
Bug 1398785 - Kill structurally dead code in NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN generated by Coverity.
https://reviewboard.mozilla.org/r/178668/#review183666
::: tools/coverity/model.cpp:63
(Diff revision 1)
> +#define NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(_class) \
> + NS_IMETHODIMP_(bool) \
> + NS_CYCLE_COLLECTION_CLASSNAME(_class)::CanSkipThisReal(void* p) \
> + { \
> + __coverity_panic__(); \
> + _class* tmp = DowncastCCParticipant<_class>(p);
What will happen if this changes in the base code?
I am concerned that we might miss changes here, don't you think?
Assignee | ||
Comment 5•7 years ago
|
||
(In reply to Sylvestre Ledru [:sylvestre] from comment #4)
> Comment on attachment 8906929 [details]
> Bug 1398785 - Kill structurally dead code in
> NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN generated by Coverity.
>
> https://reviewboard.mozilla.org/r/178668/#review183666
>
> ::: tools/coverity/model.cpp:63
> (Diff revision 1)
> > +#define NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(_class) \
> > + NS_IMETHODIMP_(bool) \
> > + NS_CYCLE_COLLECTION_CLASSNAME(_class)::CanSkipThisReal(void* p) \
> > + { \
> > + __coverity_panic__(); \
> > + _class* tmp = DowncastCCParticipant<_class>(p);
>
> What will happen if this changes in the base code?
> I am concerned that we might miss changes here, don't you think?
I don't think that the current state of the code will change in the near to medium feature since the definition above is part of a meta-data that defines a member function header, and if it changes it would mean that a major refactor will be done to the code.
Let's say that this will change, in this case the only thing that Coverity will ignore is the branch of the definition skipping thus the analysis of the rest of the body.
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8906929 [details]
Bug 1398785 - Kill structurally dead code in NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN generated by Coverity.
https://reviewboard.mozilla.org/r/178668/#review183674
OK, let's try then!
Attachment #8906929 -
Flags: review?(sledru) → review+
Pushed by bpostelnicu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c4cedbf13eb8
Kill structurally dead code in NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN generated by Coverity. r=sylvestre
Comment 8•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Updated•7 years ago
|
Product: Core → Firefox Build System
Updated•2 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
•