Mir

Merge lp:~mir-team/mir/fix-1465883-and-1341490 into lp:mir

Proposed by Daniel van Vugt
Status: Rejected
Rejected by: Alan Griffiths
Proposed branch: lp:~mir-team/mir/fix-1465883-and-1341490
Merge into: lp:mir
Diff against target: 32 lines (+3/-3)
3 files modified
debian/control (+1/-1)
debian/libmirprotobuf1.install (+1/-1)
src/protobuf/CMakeLists.txt (+1/-1)
To merge this branch: bzr merge lp:~mir-team/mir/fix-1465883-and-1341490
Reviewer Review Type Date Requested Status
Alan Griffiths Disapprove
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+262181@code.launchpad.net

Commit message

Bump the libmirprotobuf ABI from 0 to 1. Technically we've broken the
ABI plenty of times without bumping. But it becomes a real problem in
the wild when we do a release that also bumps the client ABI.

If you have a newer libmirprotobuf0 used by both an older libmirclient8
and newer libmirclient9 then only libmirclient9 will know the correct
object sizes -- objects that we instantiate on the stack. Existing
clients in that case that still use libmirclient8 will then be
instantiating message objects with the wrong size/structure on the
stack which leads to stack corruption and client crashes.
(LP: #1465883) (LP: #1341490)

And we do wish to keep instantiating message objects on the stack
because that helps with IPC/RPC performance not touching the heap
on every message.

Also keep in mind mirprotobuf is a "private" ABI. We are free to bump
it without needing to bump the public ABIs like libmirclient. Because
clients have no direct dynamic linkage to anything in libmirprotobuf.
.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

This approach has been tried and rejected

review: Disapprove

Unmerged revisions

2674. By Daniel van Vugt

Bump libmirprotobuf ABI from 0 to 1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/control'
--- debian/control 2015-06-17 05:20:42 +0000
+++ debian/control 2015-06-17 06:43:47 +0000
@@ -47,7 +47,7 @@
47# just go ahead. ~mir-team will notice and sync up the code again.47# just go ahead. ~mir-team will notice and sync up the code again.
48Vcs-Bzr: https://code.launchpad.net/~mir-team/mir/trunk48Vcs-Bzr: https://code.launchpad.net/~mir-team/mir/trunk
4949
50Package: libmirprotobuf050Package: libmirprotobuf1
51Section: libs51Section: libs
52Architecture: linux-any52Architecture: linux-any
53Multi-Arch: same53Multi-Arch: same
5454
=== renamed file 'debian/libmirprotobuf0.install' => 'debian/libmirprotobuf1.install'
--- debian/libmirprotobuf0.install 2015-06-16 12:26:32 +0000
+++ debian/libmirprotobuf1.install 2015-06-17 06:43:47 +0000
@@ -1,1 +1,1 @@
1usr/lib/*/libmirprotobuf.so.01usr/lib/*/libmirprotobuf.so.1
22
=== modified file 'src/protobuf/CMakeLists.txt'
--- src/protobuf/CMakeLists.txt 2015-06-17 05:20:42 +0000
+++ src/protobuf/CMakeLists.txt 2015-06-17 06:43:47 +0000
@@ -25,7 +25,7 @@
25 ${PROTOBUF_LIBRARIES}25 ${PROTOBUF_LIBRARIES}
26)26)
2727
28set(MIRPROTOBUF_ABI 0)28set(MIRPROTOBUF_ABI 1)
2929
30set_target_properties(30set_target_properties(
31 mirprotobuf31 mirprotobuf

Subscribers

People subscribed via source and target branches