Mir

Merge lp:~andreas-pokorny/mir/fix-1528135 into lp:mir

Proposed by Andreas Pokorny
Status: Merged
Approved by: Andreas Pokorny
Approved revision: no longer in the source branch.
Merged at revision: 3255
Proposed branch: lp:~andreas-pokorny/mir/fix-1528135
Merge into: lp:mir
Diff against target: 315 lines (+187/-45)
5 files modified
debian/mir-test-tools.install (+1/-0)
src/server/graphics/default_configuration.cpp (+57/-45)
tests/acceptance-tests/test_server_shutdown.cpp (+20/-0)
tests/mir_test_framework/CMakeLists.txt (+20/-0)
tests/mir_test_framework/platform_graphics_throw.cpp (+89/-0)
To merge this branch: bzr merge lp:~andreas-pokorny/mir/fix-1528135
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Mir CI Bot continuous-integration Approve
Chris Halse Rogers Approve
Daniel van Vugt Abstain
Kevin DuBois (community) Approve
Alan Griffiths Approve
Review via email: mp+282466@code.launchpad.net

Commit message

Handle exceptions during platform construction

Since we no longer assign the mir::SharedLibrary instance for a graphics platform to a global variable or a DefaultServerConfiguration member, the SharedLibrary is destroyed when the unwinding leaves the_graphics_platform(). When we rethrow the exception - to create detailed diagnostis - libstdc++ tries to access the unwinding information. But at point in time it is no longer available.

Description of the change

I was looking for a more generic solution. But the problem cannot be solved from within make_module_ptr since make_module_ptr is still within the shared library. I.e. one attempt was to attach the SharedLibrary to the exception object instead. That helped only halfways - the exception diagnostic could be printed but still the unwinding information was accessed by libstdc++ again after that. So it just crashed later. I only see a solution that catches the exception outside the library but not too far so that the offending library is still alive...

So the original solution remains unchanged.

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:3240
https://mir-jenkins.ubuntu.com/job/mir-ci/40/
Executed test runs:
    None: https://mir-jenkins.ubuntu.com/job/generic-update-mp/39/console

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/40/rebuild

review: Approve (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

No test?

review: Approve
Revision history for this message
Kevin DuBois (kdub) wrote :

lgtm

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:3240
http://jenkins.qa.ubuntu.com/job/mir-ci/6006/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-android-vivid-i386-build/5519
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-clang-vivid-amd64-build/4426
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-vivid-touch/5475
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-xenial-touch/270
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-xenial-amd64-ci/330
        deb: http://jenkins.qa.ubuntu.com/job/mir-xenial-amd64-ci/330/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-xenial-i386-ci/330
        deb: http://jenkins.qa.ubuntu.com/job/mir-xenial-i386-ci/330/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-builder-vivid-armhf/5472
        deb: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-builder-vivid-armhf/5472/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-runner-touch/7946
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26620
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-builder-xenial-armhf/266
        deb: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-builder-xenial-armhf/266/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-runner-xenial-touch/124
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26630

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/mir-ci/6006/rebuild

review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I'm all for fixing bug 1528135 by any means. But it doesn't help the fact that make_module_ptr is fundamentally unsafe and needs fixing or removing completely. We can however treat them as separate issues...
  https://code.launchpad.net/~vanvugt/mir/fix-1527449/+merge/281969

review: Abstain
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

> No test?

Oh right I just need a platform that throws on construcion.

Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

Ok this need another change. The test platform is incomplete the exception is thrown to early..

Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:3241
https://mir-jenkins.ubuntu.com/job/mir-ci/52/
Executed test runs:
    None: https://mir-jenkins.ubuntu.com/job/generic-update-mp/52/console

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/52/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:3242
https://mir-jenkins.ubuntu.com/job/mir-ci/54/
Executed test runs:
    None: https://mir-jenkins.ubuntu.com/job/generic-update-mp/54/console

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/54/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

8: [----------] 1 test from ServerShutdownWithException
8: [ RUN ] ServerShutdownWithException.clean_shutdown_on_plugin_construction_exception
8: unknown file: Failure
8: C++ exception with description "unrecognised option 'logging'" thrown in the test body.
8: [ FAILED ] ServerShutdownWithException.clean_shutdown_on_plugin_construction_exception (6 ms)
8: [----------] 1 test from ServerShutdownWithException (6 ms total)
8:

not the exception i was looking for..

Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:3243
https://mir-jenkins.ubuntu.com/job/mir-ci/72/
Executed test runs:
    None: https://mir-jenkins.ubuntu.com/job/generic-update-mp/72/console

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/72/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Chris Halse Rogers (raof) wrote :

Sure.

review: Approve
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:3244
https://mir-jenkins.ubuntu.com/job/mir-ci/77/
Executed test runs:
    None: https://mir-jenkins.ubuntu.com/job/generic-update-mp/77/console

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/77/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:3245
https://mir-jenkins.ubuntu.com/job/mir-ci/102/
Executed test runs:
    None: https://mir-jenkins.ubuntu.com/job/generic-update-mp/102/console

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/102/rebuild

review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:3245
http://jenkins.qa.ubuntu.com/job/mir-ci/6075/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-android-vivid-i386-build/5612
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-clang-vivid-amd64-build/4519
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-vivid-touch/5568
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-xenial-touch/306
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-xenial-amd64-ci/399
        deb: http://jenkins.qa.ubuntu.com/job/mir-xenial-amd64-ci/399/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-xenial-i386-ci/399
        deb: http://jenkins.qa.ubuntu.com/job/mir-xenial-i386-ci/399/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-builder-vivid-armhf/5565
        deb: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-builder-vivid-armhf/5565/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-runner-touch/8014
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26840
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-builder-xenial-armhf/302
        deb: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-builder-xenial-armhf/302/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-runner-xenial-touch/158
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26846

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/mir-ci/6075/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/mir-test-tools.install'
--- debian/mir-test-tools.install 2015-10-13 02:10:53 +0000
+++ debian/mir-test-tools.install 2016-01-20 18:02:01 +0000
@@ -9,6 +9,7 @@
9usr/lib/*/mir/tools/libmirclientlttng.so9usr/lib/*/mir/tools/libmirclientlttng.so
10usr/lib/*/mir/tools/libmirserverlttng.so10usr/lib/*/mir/tools/libmirserverlttng.so
11usr/lib/*/mir/server-platform/graphics-dummy.so11usr/lib/*/mir/server-platform/graphics-dummy.so
12usr/lib/*/mir/server-platform/graphics-throw.so
12usr/lib/*/mir/server-platform/input-stub.so13usr/lib/*/mir/server-platform/input-stub.so
13usr/lib/*/mir/client-platform/dummy.so14usr/lib/*/mir/client-platform/dummy.so
14usr/share/udev_recordings15usr/share/udev_recordings
1516
=== modified file 'src/server/graphics/default_configuration.cpp'
--- src/server/graphics/default_configuration.cpp 2016-01-18 15:48:38 +0000
+++ src/server/graphics/default_configuration.cpp 2016-01-20 18:02:01 +0000
@@ -38,12 +38,14 @@
38#include "mir/abnormal_exit.h"38#include "mir/abnormal_exit.h"
39#include "mir/emergency_cleanup.h"39#include "mir/emergency_cleanup.h"
40#include "mir/log.h"40#include "mir/log.h"
41#include "mir/report_exception.h"
4142
42#include "mir_toolkit/common.h"43#include "mir_toolkit/common.h"
4344
44#include <boost/throw_exception.hpp>45#include <boost/throw_exception.hpp>
4546
46#include <map>47#include <map>
48#include <sstream>
4749
48namespace mg = mir::graphics;50namespace mg = mir::graphics;
49namespace ml = mir::logging;51namespace ml = mir::logging;
@@ -73,51 +75,61 @@
73 [this]()->std::shared_ptr<mg::Platform>75 [this]()->std::shared_ptr<mg::Platform>
74 {76 {
75 std::shared_ptr<mir::SharedLibrary> platform_library;77 std::shared_ptr<mir::SharedLibrary> platform_library;
7678 std::stringstream error_report;
77 // if a host socket is set we should use the host graphics module to create a "guest" platform79 try
78 if (the_options()->is_set(options::host_socket_opt))80 {
79 {81 // if a host socket is set we should use the host graphics module to create a "guest" platform
80 auto const host_connection = the_host_connection();82 if (the_options()->is_set(options::host_socket_opt))
8183 {
82 platform_library = std::make_shared<mir::SharedLibrary>(host_connection->graphics_platform_library());84 auto const host_connection = the_host_connection();
8385
84 auto create_guest_platform = platform_library->load_function<mg::CreateGuestPlatform>(86 platform_library = std::make_shared<mir::SharedLibrary>(host_connection->graphics_platform_library());
85 "create_guest_platform",87
86 MIR_SERVER_GRAPHICS_PLATFORM_VERSION);88 auto create_guest_platform = platform_library->load_function<mg::CreateGuestPlatform>(
8789 "create_guest_platform",
88 return create_guest_platform(the_display_report(), host_connection);90 MIR_SERVER_GRAPHICS_PLATFORM_VERSION);
89 }91
9092 return create_guest_platform(the_display_report(), host_connection);
91 // fallback to standalone if host socket is unset93 }
92 if (the_options()->is_set(options::platform_graphics_lib))94
93 {95 // fallback to standalone if host socket is unset
94 platform_library = std::make_shared<mir::SharedLibrary>(the_options()->get<std::string>(options::platform_graphics_lib));96 if (the_options()->is_set(options::platform_graphics_lib))
95 }97 {
96 else98 platform_library = std::make_shared<mir::SharedLibrary>(the_options()->get<std::string>(options::platform_graphics_lib));
97 {99 }
98 auto const& path = the_options()->get<std::string>(options::platform_path);100 else
99 auto platforms = mir::libraries_for_path(path, *the_shared_library_prober_report());101 {
100 if (platforms.empty())102 auto const& path = the_options()->get<std::string>(options::platform_path);
101 {103 auto platforms = mir::libraries_for_path(path, *the_shared_library_prober_report());
102 auto msg = "Failed to find any platform plugins in: " + path;104 if (platforms.empty())
103 throw std::runtime_error(msg.c_str());105 {
104 }106 auto msg = "Failed to find any platform plugins in: " + path;
105 platform_library = mir::graphics::module_for_device(platforms, dynamic_cast<mir::options::ProgramOption&>(*the_options()));107 throw std::runtime_error(msg.c_str());
106 }108 }
107 auto create_host_platform = platform_library->load_function<mg::CreateHostPlatform>(109 platform_library = mir::graphics::module_for_device(platforms, dynamic_cast<mir::options::ProgramOption&>(*the_options()));
108 "create_host_platform",110 }
109 MIR_SERVER_GRAPHICS_PLATFORM_VERSION);111 auto create_host_platform = platform_library->load_function<mg::CreateHostPlatform>(
110 auto describe_module = platform_library->load_function<mg::DescribeModule>(112 "create_host_platform",
111 "describe_graphics_module",113 MIR_SERVER_GRAPHICS_PLATFORM_VERSION);
112 MIR_SERVER_GRAPHICS_PLATFORM_VERSION);114 auto describe_module = platform_library->load_function<mg::DescribeModule>(
113 auto description = describe_module();115 "describe_graphics_module",
114 mir::log_info("Selected driver: %s (version %d.%d.%d)",116 MIR_SERVER_GRAPHICS_PLATFORM_VERSION);
115 description->name,117 auto description = describe_module();
116 description->major_version,118 mir::log_info("Selected driver: %s (version %d.%d.%d)",
117 description->minor_version,119 description->name,
118 description->micro_version);120 description->major_version,
119121 description->minor_version,
120 return create_host_platform(the_options(), the_emergency_cleanup(), the_display_report());122 description->micro_version);
123
124 return create_host_platform(the_options(), the_emergency_cleanup(), the_display_report());
125 }
126 catch(...)
127 {
128 // access exception information before platform library gets unloaded
129 error_report << "Exception while creating graphics platform" << std::endl;
130 mir::report_exception(error_report);
131 }
132 BOOST_THROW_EXCEPTION(std::runtime_error(error_report.str()));
121 });133 });
122}134}
123135
124136
=== modified file 'tests/acceptance-tests/test_server_shutdown.cpp'
--- tests/acceptance-tests/test_server_shutdown.cpp 2015-08-20 08:40:03 +0000
+++ tests/acceptance-tests/test_server_shutdown.cpp 2016-01-20 18:02:01 +0000
@@ -17,14 +17,19 @@
17 */17 */
1818
19#include "mir/fatal.h"19#include "mir/fatal.h"
20#include "mir/server.h"
2021
21#include "mir_test_framework/interprocess_client_server_test.h"22#include "mir_test_framework/interprocess_client_server_test.h"
22#include "mir_test_framework/process.h"23#include "mir_test_framework/process.h"
24#include "mir_test_framework/temporary_environment_value.h"
25#include "mir_test_framework/executable_path.h"
26#include "mir/test/doubles/null_logger.h"
2327
24#include <gtest/gtest.h>28#include <gtest/gtest.h>
2529
26namespace mt = mir::test;30namespace mt = mir::test;
27namespace mtf = mir_test_framework;31namespace mtf = mir_test_framework;
32namespace mtd = mt::doubles;
2833
29using ServerShutdown = mtf::InterprocessClientServerTest;34using ServerShutdown = mtf::InterprocessClientServerTest;
3035
@@ -50,6 +55,21 @@
50 }55 }
51}56}
5257
58// Regression test for LP: #1528135
59TEST(ServerShutdownWithException, clean_shutdown_on_plugin_construction_exception)
60{
61 char const* argv = "ServerShutdownWithException";
62 mtf::TemporaryEnvironmentValue graphics_platform("MIR_SERVER_PLATFORM_GRAPHICS_LIB", mtf::server_platform("graphics-throw.so").c_str());
63 mtf::TemporaryEnvironmentValue input_platform("MIR_SERVER_PLATFORM_INPUT_LIB", mtf::server_platform("input-stub.so").c_str());
64 mir::Server server;
65
66 server.add_configuration_option(mtd::logging_opt, mtd::logging_descr, false);
67 server.set_command_line_handler([](int, char const* const*){});
68 server.set_command_line(0, &argv);
69 server.apply_settings();
70 server.run();
71}
72
53using ServerShutdownDeathTest = ServerShutdown;73using ServerShutdownDeathTest = ServerShutdown;
5474
55TEST_F(ServerShutdownDeathTest, abort_removes_endpoint)75TEST_F(ServerShutdownDeathTest, abort_removes_endpoint)
5676
=== modified file 'tests/mir_test_framework/CMakeLists.txt'
--- tests/mir_test_framework/CMakeLists.txt 2016-01-12 03:56:59 +0000
+++ tests/mir_test_framework/CMakeLists.txt 2016-01-20 18:02:01 +0000
@@ -154,6 +154,25 @@
154 LINK_FLAGS "-Wl,--version-script,${server_symbol_map}"154 LINK_FLAGS "-Wl,--version-script,${server_symbol_map}"
155)155)
156156
157add_library(
158 mirplatformgraphicsthrow MODULE
159 platform_graphics_throw.cpp
160)
161
162target_link_libraries(
163 mirplatformgraphicsthrow
164
165 mirplatform
166)
167
168set_target_properties(
169 mirplatformgraphicsthrow PROPERTIES;
170 LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/server-modules
171 OUTPUT_NAME graphics-throw
172 PREFIX ""
173 LINK_FLAGS "-Wl,--version-script,${server_symbol_map}"
174)
175
157add_custom_command(TARGET mir-test-framework-static POST_BUILD176add_custom_command(TARGET mir-test-framework-static POST_BUILD
158 COMMAND ${CMAKE_COMMAND} -E copy_directory177 COMMAND ${CMAKE_COMMAND} -E copy_directory
159 ${CMAKE_CURRENT_SOURCE_DIR}/udev_recordings ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/udev_recordings178 ${CMAKE_CURRENT_SOURCE_DIR}/udev_recordings ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/udev_recordings
@@ -168,6 +187,7 @@
168string (REPLACE " -Wl,--no-undefined" " " CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS})187string (REPLACE " -Wl,--no-undefined" " " CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS})
169188
170install(TARGETS mirplatformgraphicsstub LIBRARY DESTINATION ${MIR_SERVER_PLATFORM_PATH})189install(TARGETS mirplatformgraphicsstub LIBRARY DESTINATION ${MIR_SERVER_PLATFORM_PATH})
190install(TARGETS mirplatformgraphicsthrow LIBRARY DESTINATION ${MIR_SERVER_PLATFORM_PATH})
171191
172install(TARGETS mirclientplatformstub LIBRARY DESTINATION ${MIR_CLIENT_PLATFORM_PATH})192install(TARGETS mirclientplatformstub LIBRARY DESTINATION ${MIR_CLIENT_PLATFORM_PATH})
173193
174194
=== added file 'tests/mir_test_framework/platform_graphics_throw.cpp'
--- tests/mir_test_framework/platform_graphics_throw.cpp 1970-01-01 00:00:00 +0000
+++ tests/mir_test_framework/platform_graphics_throw.cpp 2016-01-20 18:02:01 +0000
@@ -0,0 +1,89 @@
1/*
2 * Copyright © 2015 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3,
6 * as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Andreas Pokorny <andreas.pokorny@canonical.com>
17 */
18
19#include "mir/graphics/platform.h"
20#include "mir/test/doubles/null_platform.h"
21#include "mir/assert_module_entry_point.h"
22#include "mir/libname.h"
23
24#include <boost/throw_exception.hpp>
25
26namespace mg = mir::graphics;
27namespace mo = mir::options;
28namespace mir
29{
30namespace options
31{
32class ProgramOption;
33}
34}
35
36namespace
37{
38class ExceptionThrowingPlatform : public mir::test::doubles::NullPlatform
39{
40public:
41 ExceptionThrowingPlatform()
42 {
43 BOOST_THROW_EXCEPTION(std::runtime_error("Exception during construction"));
44 }
45};
46
47}
48
49mg::PlatformPriority probe_graphics_platform(mo::ProgramOption const& /*options*/)
50{
51 mir::assert_entry_point_signature<mg::PlatformProbe>(&probe_graphics_platform);
52 return mg::PlatformPriority::unsupported;
53}
54
55mir::ModuleProperties const description {
56 "throw-on-creation",
57 MIR_VERSION_MAJOR,
58 MIR_VERSION_MINOR,
59 MIR_VERSION_MICRO,
60 mir::libname()
61};
62
63mir::ModuleProperties const* describe_graphics_module()
64{
65 mir::assert_entry_point_signature<mg::DescribeModule>(&describe_graphics_module);
66 return &description;
67}
68
69void add_graphics_platform_options(boost::program_options::options_description&)
70{
71 mir::assert_entry_point_signature<mg::AddPlatformOptions>(&add_graphics_platform_options);
72}
73
74mir::UniqueModulePtr<mg::Platform> create_host_platform(
75 std::shared_ptr<mo::Option> const&,
76 std::shared_ptr<mir::EmergencyCleanupRegistry> const&,
77 std::shared_ptr<mg::DisplayReport> const&)
78{
79 mir::assert_entry_point_signature<mg::CreateHostPlatform>(&create_host_platform);
80 return mir::make_module_ptr<ExceptionThrowingPlatform>();
81}
82
83mir::UniqueModulePtr<mg::Platform> create_guest_platform(
84 std::shared_ptr<mg::DisplayReport> const&,
85 std::shared_ptr<mg::NestedContext> const&)
86{
87 mir::assert_entry_point_signature<mg::CreateGuestPlatform>(&create_guest_platform);
88 return mir::make_module_ptr<ExceptionThrowingPlatform>();
89}

Subscribers

People subscribed via source and target branches