Unity tests crashes when compiling google-mocks with gcc-6

Bug #1609793 reported by Marco Trevisan (Treviño) on 2016-08-04
This bug affects 3 people
Affects Status Importance Assigned to Milestone
google-mock (Debian)
Fix Released
google-mock (Ubuntu)
Marco Trevisan (Treviño)

Bug Description

Ubuntu Unity tests fails when using gcc-6, because test-gtest causes a crash.

Starting program: /tmp/unity-7.5.0+16.10.20160804/obj-x86_64-linux-gnu/tests/test-gtest
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe0f1d700 (LWP 22778)]
[New Thread 0x7fffdbfff700 (LWP 22779)]
[New Thread 0x7fffdb7fe700 (LWP 22780)]
[==========] Running 1637 tests from 105 test cases.
[----------] Global test environment set-up.
[----------] 14 tests from TestActionLink
[ RUN ] TestActionLink.AligmentCorrectlySetDifferent

Thread 1 "test-gtest" received signal SIGSEGV, Segmentation fault.
testing::internal::FunctionMockerBase<void ()>::InvokeWith(std::tuple<> const&) (args=empty std::tuple, this=0x7fffffffdb08)
    at /usr/include/gmock/gmock-spec-builders.h:1530
1530 this->UntypedInvokeWith(&args))->GetValueAndDelete();

#0 testing::internal::FunctionMockerBase<void ()>::InvokeWith(std::tuple<> const&) (args=empty std::tuple, this=0x7fffffffdb08)
    at /usr/include/gmock/gmock-spec-builders.h:1530
No locals.
#1 testing::internal::FunctionMocker<void ()>::Invoke() (this=0x7fffffffdb08) at /usr/include/gmock/gmock-generated-function-mockers.h:76
No locals.
#2 unity::dash::ActionLinkMock::QueueDraw (this=0x7fffffffd3c0) at /tmp/unity-7.5.0+16.10.20160804/tests/test_action_link.cpp:43
No locals.
#3 0x00005555559ce574 in unity::dash::ActionLink::set_underline (this=0x7fffffffd3c0, underline=unity::StaticCairoText::NUX_UNDERLINE_NONE)
    at /tmp/unity-7.5.0+16.10.20160804/tests/../dash/previews/ActionLink.cpp:218
No locals.
#4 0x00005555559d53bf in std::function<bool (unity::StaticCairoText::UnderlineState const&)>::operator()(unity::StaticCairoText::UnderlineState const&) const (__args#0=<optimized out>, this=0x7fffffffda00) at /usr/include/c++/6/functional:2136
No locals.
#5 nux::RWProperty<unity::StaticCairoText::UnderlineState>::Set (this=0x7fffffffd9c8, value=<optimized out>)
    at /usr/include/Nux-4.0/NuxCore/Property-inl.h:218
No locals.
#6 0x00005555559d0c31 in unity::dash::TestActionLink_UnderlineCorrectlySetDifferent_Test::TestBody (this=<optimized out>)
    at /tmp/unity-7.5.0+16.10.20160804/tests/test_action_link.cpp:116

A fix is available at https://github.com/google/googletest/issues/705#issuecomment-235067917

Here's the debdiff for fixing the ubuntu package

Alexandros Frantzis (afrantzis) wrote :

This also affects mir and unity-system-compositor (and many other projects, I am sure) and is blocking all yakkety landings for them.

The attachment "google-mock-gcc6-action-result-holder-crash-fix.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package google-mock - 1.7.0-18092013-2.1~build1

google-mock (1.7.0-18092013-2.1~build1) yakkety; urgency=medium

  * Upload NMU from DELAYED to Ubuntu (build1 to ensure this is autosynced the
    next time)

google-mock (1.7.0-18092013-2.1) unstable; urgency=medium

  * Non-maintainer upload.
  * The previous upload fixed google-mock for its own testsuite, but not for
    client projects. Backport a patch from an upstream issue to modify some
    functions to not return NULL, working around the problem caused for
    google-mock itself and for its clients. (Closes: #833449) (LP: #1609793)
  * This means we don't need -fno-delete-null-pointer-checks any more, so
    remove that workaround.

 -- Iain Lane <email address hidden> Thu, 04 Aug 2016 16:14:17 +0100

Changed in google-mock (Ubuntu):
status: In Progress → Fix Released
Changed in google-mock (Debian):
status: Unknown → Fix Committed
Changed in google-mock (Debian):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.