Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 602158 - dev-cpp/gmock-1.7.0-r1 with sys-devel/gcc-6.2.0-r1 fails tests test/gmock-spec-builders_test test/gmock_link_test - Segmentation fault
Summary: dev-cpp/gmock-1.7.0-r1 with sys-devel/gcc-6.2.0-r1 fails tests test/gmock-spe...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-6
  Show dependency tree
 
Reported: 2016-12-09 13:34 UTC by eroen
Modified: 2017-08-13 11:13 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,25.61 KB, text/plain)
2016-12-09 13:34 UTC, eroen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description eroen 2016-12-09 13:34:19 UTC
Created attachment 455634 [details]
build.log

The tests pass with sys-devel/gcc-4.9.3 and sys-devel/gcc-5.4.0.


[==========] Running 131 tests from 25 test cases.
[----------] Global test environment set-up.
[----------] 1 test from MockMethodTest
[ RUN      ] MockMethodTest.CanInstantiateWithIncompleteArgType
[       OK ] MockMethodTest.CanInstantiateWithIncompleteArgType (0 ms)
[----------] 1 test from MockMethodTest (0 ms total)

[----------] 8 tests from OnCallSyntaxTest
[ RUN      ] OnCallSyntaxTest.CompilesWithMethodNameExpandedFromMacro
[       OK ] OnCallSyntaxTest.CompilesWithMethodNameExpandedFromMacro (0 ms)
[ RUN      ] OnCallSyntaxTest.WorksWithMethodNameExpandedFromMacro

GMOCK WARNING:
Uninteresting mock function call - taking default action specified at:
/var/tmp/portage/dev-cpp/gmock-1.7.0-r1/work/gmock-1.7.0/test/gmock-spec-builders_test.cc:203:
    Function call: MethodW()
          Returns: 42
Stack trace:
[       OK ] OnCallSyntaxTest.WorksWithMethodNameExpandedFromMacro (9 ms)
[ RUN      ] OnCallSyntaxTest.EvaluatesFirstArgumentOnce
[       OK ] OnCallSyntaxTest.EvaluatesFirstArgumentOnce (0 ms)
[ RUN      ] OnCallSyntaxTest.EvaluatesSecondArgumentOnce
[       OK ] OnCallSyntaxTest.EvaluatesSecondArgumentOnce (0 ms)
[ RUN      ] OnCallSyntaxTest.WithIsOptional
[       OK ] OnCallSyntaxTest.WithIsOptional (1 ms)
[ RUN      ] OnCallSyntaxTest.WithCanAppearAtMostOnce
[       OK ] OnCallSyntaxTest.WithCanAppearAtMostOnce (10 ms)
[ RUN      ] OnCallSyntaxTest.WillByDefaultIsMandatory

[WARNING] ./src/gtest-death-test.cc:825:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads.
[       OK ] OnCallSyntaxTest.WillByDefaultIsMandatory (5 ms)
[ RUN      ] OnCallSyntaxTest.WillByDefaultCanAppearAtMostOnce
[       OK ] OnCallSyntaxTest.WillByDefaultCanAppearAtMostOnce (0 ms)
[----------] 8 tests from OnCallSyntaxTest (25 ms total)

[----------] 27 tests from ExpectCallSyntaxTest
[ RUN      ] ExpectCallSyntaxTest.CompilesWithMethodNameExpandedFromMacro
[       OK ] ExpectCallSyntaxTest.CompilesWithMethodNameExpandedFromMacro (0 ms)
[ RUN      ] ExpectCallSyntaxTest.WorksWithMethodNameExpandedFromMacro
[       OK ] ExpectCallSyntaxTest.WorksWithMethodNameExpandedFromMacro (0 ms)
[ RUN      ] ExpectCallSyntaxTest.EvaluatesFirstArgumentOnce
/bin/sh: line 5: 19551 Segmentation fault      ${dir}$tst
FAIL: test/gmock-spec-builders_test
Running main() from gmock_main.cc
[==========] Running 92 tests from 2 test cases.
[----------] Global test environment set-up.
[----------] 46 tests from LinkTest2
[ RUN      ] LinkTest2.TestReturnVoid
/bin/sh: line 5: 19570 Segmentation fault      ${dir}$tst
FAIL: test/gmock_link_test
Running main() from gmock_main.cc
[==========] Running 13 tests from 3 test cases.
[----------] Global test environment set-up.
[----------] 6 tests from InitGoogleMockTest
[ RUN      ] InitGoogleMockTest.ParsesInvalidCommandLine
[       OK ] InitGoogleMockTest.ParsesInvalidCommandLine (0 ms)
[ RUN      ] InitGoogleMockTest.ParsesEmptyCommandLine
[       OK ] InitGoogleMockTest.ParsesEmptyCommandLine (0 ms)
[ RUN      ] InitGoogleMockTest.ParsesSingleFlag
[       OK ] InitGoogleMockTest.ParsesSingleFlag (0 ms)
[ RUN      ] InitGoogleMockTest.ParsesUnrecognizedFlag
[       OK ] InitGoogleMockTest.ParsesUnrecognizedFlag (0 ms)
[ RUN      ] InitGoogleMockTest.ParsesGoogleMockFlagAndUnrecognizedFlag
[       OK ] InitGoogleMockTest.ParsesGoogleMockFlagAndUnrecognizedFlag (0 ms)
[ RUN      ] InitGoogleMockTest.CallsInitGoogleTest
[       OK ] InitGoogleMockTest.CallsInitGoogleTest (0 ms)
[----------] 6 tests from InitGoogleMockTest (9 ms total)

[----------] 6 tests from WideInitGoogleMockTest
[ RUN      ] WideInitGoogleMockTest.ParsesInvalidCommandLine
[       OK ] WideInitGoogleMockTest.ParsesInvalidCommandLine (0 ms)
[ RUN      ] WideInitGoogleMockTest.ParsesEmptyCommandLine
[       OK ] WideInitGoogleMockTest.ParsesEmptyCommandLine (0 ms)
[ RUN      ] WideInitGoogleMockTest.ParsesSingleFlag
[       OK ] WideInitGoogleMockTest.ParsesSingleFlag (5 ms)
[ RUN      ] WideInitGoogleMockTest.ParsesUnrecognizedFlag
[       OK ] WideInitGoogleMockTest.ParsesUnrecognizedFlag (0 ms)
[ RUN      ] WideInitGoogleMockTest.ParsesGoogleMockFlagAndUnrecognizedFlag
[       OK ] WideInitGoogleMockTest.ParsesGoogleMockFlagAndUnrecognizedFlag (0 ms)
[ RUN      ] WideInitGoogleMockTest.CallsInitGoogleTest
[       OK ] WideInitGoogleMockTest.CallsInitGoogleTest (0 ms)
[----------] 6 tests from WideInitGoogleMockTest (11 ms total)

[----------] 1 test from FlagTest
[ RUN      ] FlagTest.IsAccessibleInCode
[       OK ] FlagTest.IsAccessibleInCode (0 ms)
[----------] 1 test from FlagTest (0 ms total)

[----------] Global test environment tear-down
[==========] 13 tests from 3 test cases ran. (34 ms total)
[  PASSED  ] 13 tests.
PASS: test/gmock_fused_test
============================================
2 of 3 tests failed
Please report to googlemock@googlegroups.com
============================================
Makefile:882: recipe for target 'check-TESTS' failed
make[2]: *** [check-TESTS] Error 1
make[2]: Leaving directory '/var/tmp/portage/dev-cpp/gmock-1.7.0-r1/work/gmock-1.7.0-abi_x86_64.amd64'
Makefile:1166: recipe for target 'check-am' failed
make[1]: *** [check-am] Error 2
make[1]: Leaving directory '/var/tmp/portage/dev-cpp/gmock-1.7.0-r1/work/gmock-1.7.0-abi_x86_64.amd64'
Makefile:753: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1
 * ERROR: dev-cpp/gmock-1.7.0-r1::gentoo failed (test phase):
 *   emake failed

localhost ~ # dmesg | tail
[  420.719016] INFO: NMI handler (perf_event_nmi_handler) took too long to run: 1.291 msecs
[  424.686770] hrtimer: interrupt took 25451447 ns
[  543.302610] INFO: NMI handler (perf_event_nmi_handler) took too long to run: 1.770 msecs
[  543.302610] perf interrupt took too long (40339 > 31250), lowering kernel.perf_event_max_sample_rate to 4000
[ 4929.448150] clocksource: timekeeping watchdog: Marking clocksource 'tsc' as unstable because the skew is too large:
[ 4929.448150] clocksource:                       'hpet' wd_now: c8ad4bcf wd_last: c393a40f mask: ffffffff
[ 4929.448150] clocksource:                       'tsc' cs_now: b2cbb40e8c0 cs_last: b2c70f91b25 mask: ffffffffffffffff
[ 4929.804883] clocksource: Switched to clocksource hpet
[10477.470190] gmock-spec-buil[19551]: segfault at 0 ip 000000000044252f sp 00007ffd2e1ccd50 error 4 in gmock-spec-builders_test[400000+78000]
[10477.504107] gmock_link_test[19570]: segfault at 0 ip 0000000000417590 sp 00007fffbacbf410 error 4 in gmock_link_test[400000+52000]
Comment 1 eroen 2016-12-09 13:34:41 UTC
localhost ~ # emerge --info '=dev-cpp/gmock-1.7.0-r1::gentoo'
Portage 2.3.0 (python 3.4.5-final-0, default/linux/amd64/13.0, gcc-6.2.0, glibc-2.22-r4, 4.4.6-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.4.6-gentoo-x86_64-Intel-R-_Core-TM-_i5-2520M_CPU_@_2.50GHz-with-gentoo-2.2
KiB Mem:     4043380 total,   3093844 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Fri, 09 Dec 2016 00:45:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.22.2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.22.4::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo, 6.2.0-r1::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS=""
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl amd64 berkdb bindist bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 mmx mmxext modules multilib ncurses nls nptl openmp pam pcre readline seccomp session sse sse2 ssl tcpd unicode xattr zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

localhost ~ # emerge -pqv '=dev-cpp/gmock-1.7.0-r1::gentoo'
[ebuild  N    ] dev-cpp/gmock-1.7.0-r1  USE="{test} -static-libs" ABI_X86="(64) -32 (-x32)" 

 * IMPORTANT: 13 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.
Comment 2 Jonas Stein gentoo-dev 2016-12-10 08:01:42 UTC
the old gmock requires:
C++98-standard-compliant compiler
Perhaps gcc6 needs to run in a more conservative mode, or we should update to gtest/gmock (see: https://bugs.gentoo.org/show_bug.cgi?id=602218)
It includes the latest gmock.
Comment 3 SpanKY gentoo-dev 2016-12-10 16:47:56 UTC
we're not changing the default behavior of gcc
Comment 4 Peter Levine 2017-08-01 00:25:36 UTC
PR: https://github.com/gentoo/gentoo/pull/5262
Comment 5 David Seifert gentoo-dev 2017-08-13 11:13:10 UTC
commit ac45361a557b7bc4a540754e6582854712385df5
Author: Peter Levine <plevine457@gmail.com>
Date:   Mon Jul 31 20:20:27 2017 -0400

    dev-cpp/gmock: Fix test failure with GCC-6
    
    Bug: https://bugs.gentoo.org/show_bug.cgi?id=602158