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
1=== modified file 'debian/control'
2--- debian/control 2015-06-17 05:20:42 +0000
3+++ debian/control 2015-06-17 06:43:47 +0000
4@@ -47,7 +47,7 @@
5 # just go ahead. ~mir-team will notice and sync up the code again.
6 Vcs-Bzr: https://code.launchpad.net/~mir-team/mir/trunk
7
8-Package: libmirprotobuf0
9+Package: libmirprotobuf1
10 Section: libs
11 Architecture: linux-any
12 Multi-Arch: same
13
14=== renamed file 'debian/libmirprotobuf0.install' => 'debian/libmirprotobuf1.install'
15--- debian/libmirprotobuf0.install 2015-06-16 12:26:32 +0000
16+++ debian/libmirprotobuf1.install 2015-06-17 06:43:47 +0000
17@@ -1,1 +1,1 @@
18-usr/lib/*/libmirprotobuf.so.0
19+usr/lib/*/libmirprotobuf.so.1
20
21=== modified file 'src/protobuf/CMakeLists.txt'
22--- src/protobuf/CMakeLists.txt 2015-06-17 05:20:42 +0000
23+++ src/protobuf/CMakeLists.txt 2015-06-17 06:43:47 +0000
24@@ -25,7 +25,7 @@
25 ${PROTOBUF_LIBRARIES}
26 )
27
28-set(MIRPROTOBUF_ABI 0)
29+set(MIRPROTOBUF_ABI 1)
30
31 set_target_properties(
32 mirprotobuf

Subscribers

People subscribed via source and target branches