Skip to content

Instantly share code, notes, and snippets.

@mjcarroll
Created September 5, 2019 23:27
Show Gist options
  • Save mjcarroll/f943903f108421eac18058db08a7df70 to your computer and use it in GitHub Desktop.
Save mjcarroll/f943903f108421eac18058db08a7df70 to your computer and use it in GitHub Desktop.
backward_output_faulty_plugins
[ RUN ] LaunchPluginDeathTest.SegfaultOnLoad
Stack trace (most recent call last):
#15 Object "", at 0xffffffffffffffff, in
#14 Object "/home/michael/workspaces/ign_blueprint_again/build/ignition-launch1/bin/INTEGRATION_faulty_plugins", at 0x55cfb77490d9, in _start
#13 Source "/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c", line 310, in __libc_start_main [0x7f55c2065b96]
#12 | Source "/home/michael/workspaces/ign_blueprint_again/src/ign-launch/test/gtest/src/gtest_main.cc", line 37, in main
| 35: printf("Running main() from gtest_main.cc\n");
| 36: testing::InitGoogleTest(&argc, argv);
| > 37: return RUN_ALL_TESTS();
| 38: }
Source "/home/michael/workspaces/ign_blueprint_again/src/ign-launch/test/gtest/include/gtest/gtest.h", line 2288, in RUN_ALL_TESTS() [0x55cfb7749071]
2285: int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_;
2286:
2287: inline int RUN_ALL_TESTS() {
>2288: return ::testing::UnitTest::GetInstance()->Run();
2289: }
2290:
2291: #endif // GTEST_INCLUDE_GTEST_GTEST_H_
#11 Source "/home/michael/workspaces/ign_blueprint_again/src/ign-launch/test/gtest/src/gtest.cc", line 3927, in testing::UnitTest::Run() [0x55cfb7760b45]
3924: }
3925: #endif // GTEST_HAS_SEH
3926:
>3927: return internal::HandleExceptionsInMethodIfSupported(
3928: impl(),
3929: &internal::UnitTestImpl::RunAllTests,
3930: "auxiliary test code (environments or event listeners)") ? 0 : 1;
#10 | Source "/home/michael/workspaces/ign_blueprint_again/src/ign-launch/test/gtest/src/gtest.cc", line 2115, in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)
| 2113: #if GTEST_HAS_EXCEPTIONS
| 2114: try {
| >2115: return HandleSehExceptionsInMethodIfSupported(object, method, location);
| 2116: } catch (const internal::GoogleTestFailureException&) { // NOLINT
| 2117: // This exception type can only be thrown by a failed Google
Source "/home/michael/workspaces/ign_blueprint_again/src/ign-launch/test/gtest/src/gtest.cc", line 2079, in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) [0x55cfb7768e19]
2076: }
2077: #else
2078: (void)location;
>2079: return (object->*method)();
2080: #endif // GTEST_HAS_SEH
2081: }
#9 | Source "/home/michael/workspaces/ign_blueprint_again/src/ign-launch/test/gtest/src/gtest.cc", line 4223, in testing::internal::UnitTestImpl::RunAllTests()
| 4221: // All other functions called from RunAllTests() may safely assume that
| 4222: // parameterized tests are ready to be counted and run.
| >4223: bool UnitTestImpl::RunAllTests() {
| 4224: // Makes sure InitGoogleTest() was called.
| 4225: if (!GTestIsInitialized()) {
| Source "/home/michael/workspaces/ign_blueprint_again/src/ign-launch/test/gtest/src/gtest.cc", line 4316, in
| 4314: for (int test_index = 0; test_index < total_test_case_count();
| 4315: test_index++) {
| >4316: GetMutableTestCase(test_index)->Run();
| 4317: }
| 4318: }
Source "/home/michael/workspaces/ign_blueprint_again/src/ign-launch/test/gtest/src/gtest.cc", line 2431, in testing::internal::UnitTestImpl::RunAllTests() [0x55cfb77609c2]
2429: // Runs every test in this TestCase.
2430: void TestCase::Run() {
>2431: if (!should_run_) return;
2432:
2433: internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
2434: impl->set_current_test_case(this);
#8 | Source "/home/michael/workspaces/ign_blueprint_again/src/ign-launch/test/gtest/src/gtest.cc", line 2445, in
| 2443: const internal::TimeInMillis start = internal::GetTimeInMillis();
| 2444: for (int i = 0; i < total_test_count(); i++) {
| >2445: GetMutableTestInfo(i)->Run();
| 2446: }
| 2447: elapsed_time_ = internal::GetTimeInMillis() - start;
Source "/home/michael/workspaces/ign_blueprint_again/src/ign-launch/test/gtest/src/gtest.cc", line 2302, in testing::TestCase::Run() [clone .part.460] [0x55cfb77603c8]
2299: // Creates the test object, runs it, records its result, and then
2300: // deletes it.
2301: void TestInfo::Run() {
>2302: if (!should_run_) return;
2303:
2304: // Tells UnitTest where to store test result.
2305: internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
#7 | Source "/home/michael/workspaces/ign_blueprint_again/src/ign-launch/test/gtest/src/gtest.cc", line 2327, in
| 2325: // This doesn't throw as all user code that can throw are wrapped into
| 2326: // exception handling code.
| >2327: test->Run();
| 2328: }
Source "/home/michael/workspaces/ign_blueprint_again/src/ign-launch/test/gtest/src/gtest.cc", line 2143, in testing::TestInfo::Run() [clone .part.459] [0x55cfb77602a4]
2141: // Runs the test and updates the test result.
2142: void Test::Run() {
>2143: if (!HasSameFixtureClass()) return;
2144:
2145: internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
2146: impl->os_stack_trace_getter()->UponLeavingGTest();
#6 Source "/home/michael/workspaces/ign_blueprint_again/src/ign-launch/test/gtest/src/gtest.cc", line 2151, in testing::Test::Run() [clone .part.458] [0x55cfb7760089]
2148: // We will run the test only if SetUp() was successful.
2149: if (!HasFatalFailure()) {
2150: impl->os_stack_trace_getter()->UponLeavingGTest();
>2151: internal::HandleExceptionsInMethodIfSupported(
2152: this, &Test::TestBody, "the test body");
2153: }
#5 | Source "/home/michael/workspaces/ign_blueprint_again/src/ign-launch/test/gtest/src/gtest.cc", line 2115, in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*)
| 2113: #if GTEST_HAS_EXCEPTIONS
| 2114: try {
| >2115: return HandleSehExceptionsInMethodIfSupported(object, method, location);
| 2116: } catch (const internal::GoogleTestFailureException&) { // NOLINT
| 2117: // This exception type can only be thrown by a failed Google
Source "/home/michael/workspaces/ign_blueprint_again/src/ign-launch/test/gtest/src/gtest.cc", line 2079, in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) [0x55cfb7768939]
2076: }
2077: #else
2078: (void)location;
>2079: return (object->*method)();
2080: #endif // GTEST_HAS_SEH
2081: }
#4 Source "/home/michael/workspaces/ign_blueprint_again/src/ign-launch/test/integration/faulty_plugins.cc", line 46, in LaunchPluginDeathTest_SegfaultOnLoad_Test::TestBody() [0x55cfb7749500]
43: TEST_F(LaunchPluginDeathTest, SegfaultOnLoad)
44: {
45: auto config = getConfig("SegfaultOnLoad");
> 46: mgr.RunConfig(config);
47: }
48:
#3 Source "/home/michael/workspaces/ign_blueprint_again/src/ign-launch/src/Manager.cc", line 252, in ignition::launch::IGNITION_LAUNCH_VERSION_NAMESPACE::Manager::RunConfig(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) [0x7f55c2c04b6e]
249: this->dataPtr->master = true;
250:
251: // Parse the configuration string, and run all the specified commands.
> 252: if (!this->dataPtr->ParseConfig(_config))
253: return false;
254:
255: // Child processes should exit
#2 Source "/home/michael/workspaces/ign_blueprint_again/src/ign-launch/src/Manager.cc", line 512, in ignition::launch::IGNITION_LAUNCH_VERSION_NAMESPACE::ManagerPrivate::ParseConfig(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) [0x7f55c2c04a72]
509: tinyxml2::XMLElement *pluginElem = root->FirstChildElement("plugin");
510: while (pluginElem)
511: {
> 512: this->LoadPlugin(pluginElem);
513: pluginElem = pluginElem->NextSiblingElement("plugin");
514: }
515: }
#1 Source "/home/michael/workspaces/ign_blueprint_again/src/ign-launch/src/Manager.cc", line 808, in ignition::launch::IGNITION_LAUNCH_VERSION_NAMESPACE::ManagerPrivate::LoadPlugin(tinyxml2::XMLElement const*) [0x7f55c2c0438e]
805: << "] File[" << file << "]" << std::endl;
806:
807: PluginPtr plugin = loader.Instantiate(name);
> 808: if (plugin->QueryInterface<Plugin>()->Load(_elem))
809: this->plugins.insert(plugin);
810: }
#0 Source "/home/michael/workspaces/ign_blueprint_again/src/ign-launch/test/integration/plugins/bad_plugins.cc", line 28, in SegfaultOnLoad::Load(tinyxml2::XMLElement const*) [0x7f55c00aebb0]
25: bool SegfaultOnLoad::Load(const tinyxml2::XMLElement * /*_elem*/)
26: {
27: char* a = 0;
> 28: char b = a[42];
29: std::cout << "result: " << b << std::endl;
30: return true;
31: }
Segmentation fault (Address not mapped to object [0x2a])
[1] 26933 segmentation fault (core dumped) ./bin/INTEGRATION_faulty_plugins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment