Merge lp://qastaging/~albaguirre/mir/fix-1465883 into lp://qastaging/mir
Status: | Merged |
---|---|
Approved by: | Alberto Aguirre |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2674 |
Proposed branch: | lp://qastaging/~albaguirre/mir/fix-1465883 |
Merge into: | lp://qastaging/mir |
Diff against target: |
1413 lines (+308/-238) 12 files modified
src/client/buffer_stream.cpp (+38/-37) src/client/buffer_stream.h (+3/-3) src/client/make_protobuf_object.h (+42/-0) src/client/mir_connection.cpp (+56/-49) src/client/mir_connection.h (+8/-6) src/client/mir_prompt_session.cpp (+21/-15) src/client/mir_prompt_session.h (+5/-5) src/client/mir_screencast.cpp (+24/-21) src/client/mir_screencast.h (+4/-2) src/client/mir_surface.cpp (+83/-76) src/client/mir_surface.h (+6/-7) src/client/rpc/mir_protobuf_rpc_channel.cpp (+18/-17) |
To merge this branch: | bzr merge lp://qastaging/~albaguirre/mir/fix-1465883 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alan Griffiths | Approve | ||
Chris Halse Rogers | Approve | ||
Daniel van Vugt | Needs Fixing | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email:
|
Commit message
Avoid allocating mir::protobuf objects on the stack
When an addition is made to a protobuf message, a stack allocation of such object may differ from what the destructor of that message is expecting as the destructor is defined by libmirprotobuf and the allocation may have been made from an older definition of the message (by an older mirclient library for example) which can lead to stack corruption.
Ideally, the mirprotobuf library would have versioned symbols and have the ability to be loaded in parallel to a previous version but that's not currently possible.
As an alternative, avoid allocating mir defined protobuf objects on the stack and instead use the xxx::default_
Description of the change
Avoid allocating mir::protobuf objects on the stack
When an addition is made to a protobuf message, a stack allocation of such object may differ from what the destructor of that message is expecting as the destructor is defined by libmirprotobuf and the allocation may have been made from an older definition of the message (by an older mirclient library for example) which can lead to stack corruption.
Ideally, the mirprotobuf library would have versioned symbols and have the ability to be loaded in parallel to a previous version but that's not currently possible.
As an alternative, avoid allocating mir defined protobuf objects on the stack and instead use the xxx::default_
PASSED: Continuous integration, rev:2671 jenkins. qa.ubuntu. com/job/ mir-ci/ 4120/ jenkins. qa.ubuntu. com/job/ mir-android- vivid-i386- build/2880 jenkins. qa.ubuntu. com/job/ mir-clang- wily-amd64- build/393 jenkins. qa.ubuntu. com/job/ mir-mediumtests -vivid- touch/2828 jenkins. qa.ubuntu. com/job/ mir-wily- amd64-ci/ 276 jenkins. qa.ubuntu. com/job/ mir-wily- amd64-ci/ 276/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 2828 jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 2828/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -runner- mako/5658 s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 21235
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- ci/4120/ rebuild
http://