From 62f67115b5c46134c34f88f4b1cbdacc19384c0a Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 30 Sep 2018 11:19:18 +0100 Subject: gentoo resync : 30.09.2018 --- .../gtest-1.8.0-fix-gcc6-undefined-behavior.patch | 21 +++++++++++++++++++++ .../gtest-9999-fix-gcc6-undefined-behavior.patch | 14 +++++--------- 2 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 dev-cpp/gtest/files/gtest-1.8.0-fix-gcc6-undefined-behavior.patch (limited to 'dev-cpp/gtest/files') diff --git a/dev-cpp/gtest/files/gtest-1.8.0-fix-gcc6-undefined-behavior.patch b/dev-cpp/gtest/files/gtest-1.8.0-fix-gcc6-undefined-behavior.patch new file mode 100644 index 000000000000..eadfe6197389 --- /dev/null +++ b/dev-cpp/gtest/files/gtest-1.8.0-fix-gcc6-undefined-behavior.patch @@ -0,0 +1,21 @@ +Fix build with GCC 6 due to lifetime issues. + +--- a/googletest/src/gtest.cc ++++ b/googletest/src/gtest.cc +@@ -2654,10 +2654,12 @@ + test->Run(); + } + +- // Deletes the test object. +- impl->os_stack_trace_getter()->UponLeavingGTest(); +- internal::HandleExceptionsInMethodIfSupported( +- test, &Test::DeleteSelf_, "the test fixture's destructor"); ++ if (test != NULL) { ++ // Deletes the test object. ++ impl->os_stack_trace_getter()->UponLeavingGTest(); ++ internal::HandleExceptionsInMethodIfSupported( ++ test, &Test::DeleteSelf_, "the test fixture's destructor"); ++ } + + result_.set_elapsed_time(internal::GetTimeInMillis() - start); + diff --git a/dev-cpp/gtest/files/gtest-9999-fix-gcc6-undefined-behavior.patch b/dev-cpp/gtest/files/gtest-9999-fix-gcc6-undefined-behavior.patch index eadfe6197389..8dfed46d4585 100644 --- a/dev-cpp/gtest/files/gtest-9999-fix-gcc6-undefined-behavior.patch +++ b/dev-cpp/gtest/files/gtest-9999-fix-gcc6-undefined-behavior.patch @@ -2,19 +2,15 @@ Fix build with GCC 6 due to lifetime issues. --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc -@@ -2654,10 +2654,12 @@ +@@ -2693,10 +2693,12 @@ test->Run(); } -- // Deletes the test object. -- impl->os_stack_trace_getter()->UponLeavingGTest(); -- internal::HandleExceptionsInMethodIfSupported( -- test, &Test::DeleteSelf_, "the test fixture's destructor"); + if (test != NULL) { -+ // Deletes the test object. -+ impl->os_stack_trace_getter()->UponLeavingGTest(); -+ internal::HandleExceptionsInMethodIfSupported( -+ test, &Test::DeleteSelf_, "the test fixture's destructor"); + // Deletes the test object. + impl->os_stack_trace_getter()->UponLeavingGTest(); + internal::HandleExceptionsInMethodIfSupported( + test, &Test::DeleteSelf_, "the test fixture's destructor"); + } result_.set_elapsed_time(internal::GetTimeInMillis() - start); -- cgit v1.2.3