--- /dev/null
+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);
+
--- 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);
PATCHES=(
"${FILESDIR}"/${PN}-9999-fix-py-tests.patch
- "${FILESDIR}"/${PN}-9999-fix-gcc6-undefined-behavior.patch
+ "${FILESDIR}"/${PN}-1.8.0-fix-gcc6-undefined-behavior.patch
"${FILESDIR}"/${PN}-1.8.0-multilib-strict.patch
"${FILESDIR}"/${PN}-1.8.0-increase-clone-stack-size.patch
"${FILESDIR}"/${PN}-1.8.0-fix-doublefree.patch
PATCHES=(
"${FILESDIR}"/${PN}-9999-fix-py-tests.patch
- "${FILESDIR}"/${PN}-9999-fix-gcc6-undefined-behavior.patch
+ "${FILESDIR}"/${PN}-1.8.0-fix-gcc6-undefined-behavior.patch
"${FILESDIR}"/${PN}-1.8.0-multilib-strict.patch
"${FILESDIR}"/${PN}-1.8.0-increase-clone-stack-size.patch
)