Merge lp:~vanvugt/mir/fix-1401488 into lp:mir
| Status: | Merged |
|---|---|
| Approved by: | Daniel van Vugt on 2015-01-06 |
| Approved revision: | 2191 |
| Merged at revision: | 2197 |
| Proposed branch: | lp:~vanvugt/mir/fix-1401488 |
| Merge into: | lp:mir |
| Diff against target: |
50 lines (+33/-0) 1 file modified
src/server/glib_main_loop_sources.cpp (+33/-0) |
| To merge this branch: | bzr merge lp:~vanvugt/mir/fix-1401488 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| PS Jenkins bot | continuous-integration | 2014-12-30 | Approve on 2015-01-06 |
| Robert Carr (community) | Approve on 2015-01-05 | ||
| Kevin DuBois (community) | Abstain on 2015-01-05 | ||
| Cemil Azizoglu (community) | Approve on 2015-01-05 | ||
| Alan Griffiths | 2014-12-30 | Approve on 2015-01-05 | |
| Allison Lortie | 2014-12-30 | Pending | |
|
Review via email:
|
|||
Commit Message
Avoid heap corruption and general instability caused by GSource destruction from another thread while the GMainLoop is iterating.
(LP: #1401488)
| Alan Griffiths (alan-griffiths) wrote : | # |
8 +#ifndef GLIB_HAS_
OK, we don't actually define the macro, but shouldn't it start with "MIR_"?
| Daniel van Vugt (vanvugt) wrote : | # |
GLIB_HAS_
| Alan Griffiths (alan-griffiths) wrote : | # |
The "namespace protection" would be against some other project (glib) defining GLIB_XXX. Although the chances of XXX==HAS_
| Daniel van Vugt (vanvugt) wrote : | # |
The chances are incredibly remote, but also useful... If GLib did define that macro then I would take it as a strong indication that it means exactly what it sounds like. So that would be a useful definition and not a conflicting definition.
| Alan Griffiths (alan-griffiths) wrote : | # |
The change looks plausible but I don't have a reliable way to reproduce the problem it purports to fix. (I also don't like the possibility of accidentally compiling a variant version of the code, but won't block in the risk of that happening.)
| Cemil Azizoglu (cemil-azizoglu) wrote : | # |
I tried the test case in the bug report but my machine got frozen on the server VT either way. Are you sure this is fixing it?
It does nevertheless look like the right thing to do, so approving.
| Kevin DuBois (kdub) wrote : | # |
given how macro-free we've been able to keep the mir code, I'd rather have the comment explaining that we cannot use g_source_
I guess if this is a critical bug though, will abstain.
| Daniel van Vugt (vanvugt) wrote : | # |
Yes I did make sure I had reliable test cases for reproducing the issue before attempting this fix. Actually one is missing from the bug. I'll add it...

PASSED: Continuous integration, rev:2191 jenkins. qa.ubuntu. com/job/ mir-ci/ 2548/ jenkins. qa.ubuntu. com/job/ mir-android- vivid-i386- build/695 jenkins. qa.ubuntu. com/job/ mir-clang- vivid-amd64- build/695 jenkins. qa.ubuntu. com/job/ mir-mediumtests -vivid- touch/669 jenkins. qa.ubuntu. com/job/ mir-vivid- amd64-ci/ 545 jenkins. qa.ubuntu. com/job/ mir-vivid- amd64-ci/ 545/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 669 jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 669/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -runner- mako/3802 s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 16781
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/2548/ rebuild
http://