Invalid reference in compositor.cpp
Bug #1152628 reported by
Jussi Pakkanen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Fix Released
|
High
|
Alan Griffiths |
Bug Description
Discovered by Clang.
compositor.cpp has the following piece of code.
struct FilterForVisibl
{
FilterForVi
: enclosing_
{
}
bool operator(
{
return !renderable.
}
mir:
};
The struct member is a reference, but it is initialised to a constructor argument that is passed by value. When the constructor finishes the argument is destroyed and the reference becomes invalid.
Related branches
lp://qastaging/~alan-griffiths/mir/fix-bug-1152628
- Robert Carr (community): Approve
- PS Jenkins bot (community): Approve (continuous-integration)
-
Diff: 23 lines (+4/-2)1 file modifiedsrc/compositor/compositor.cpp (+4/-2)
Changed in mir: | |
importance: | Undecided → High |
Changed in mir: | |
milestone: | none → 0.0.3 |
Changed in mir: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Luckily the invalid member isn't used.