from build log: ``` The following tests FAILED: 22 - drive-aboutfetchjobtest (SEGFAULT) 23 - drive-changefetchjobtest (SEGFAULT) 24 - drive-filecopyjobtest (SEGFAULT) 25 - drive-filecreatejobtest (SEGFAULT) 26 - drive-filesearchquerytest (SEGFAULT) 27 - drive-drivescreatejobtest (SEGFAULT) 28 - drive-drivesdeletejobtest (SEGFAULT) 29 - drive-drivesmodifyjobtest (SEGFAULT) 30 - drive-driveshidejobtest (SEGFAULT) 31 - drive-drivesfetchjobtest (SEGFAULT) 32 - drive-drivessearchquerytest (SEGFAULT) 33 - drive-teamdrivecreatejobtest (SEGFAULT) 34 - drive-teamdrivedeletejobtest (SEGFAULT) 35 - drive-teamdrivemodifyjobtest (SEGFAULT) 36 - drive-teamdrivefetchjobtest (SEGFAULT) 37 - drive-teamdrivesearchquerytest (SEGFAULT) Errors while running CTest Output from these tests are in: /var/tmp/portage/kde-apps/libkgapi-23.08.5-r1/work/libkgapi-23.08.5_build/Testing/Temporary/LastTest.log ```
Created attachment 895150 [details] libkgapi_build.log.lz
Created attachment 895151 [details] environment // profile default/linux/amd64/17.1/desktop/plasma gcc-13 O3 pipe march=native(verbose) lto graphite ggdb3
Created attachment 895152 [details] /var/tmp/portage/kde-apps/libkgapi-23.08.5-r1/work/libkgapi-23.08.5_build/Testing/Temporary/LastTest.log
Created attachment 895153 [details] my attempts to backtrace usually backtrace looks like this: ``` (gdb) bt #0 QtPrivate::RefCount::ref (this=0x0) at /usr/include/qt5/QtCore/qrefcount.h:55 #1 0x00007ffff7f55b18 in _sub_I_65535_0.0 () from /var/tmp/portage/kde-apps/libkgapi-23.08.5-r1/work/libkgapi-23.08.5_build/bin/libKPim5GAPIDrive.so.5 #2 0x00007ffff7fcd5ee in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffdb38, env=env@entry=0x7fffffffdb48) at dl-init.c:74 #3 0x00007ffff7fcd6db in call_init (env=0x7fffffffdb48, argv=0x7fffffffdb38, argc=1, l=<optimized out>) at dl-init.c:120 #4 _dl_init (main_map=0x7ffff7ffe2e0, argc=1, argv=0x7fffffffdb38, env=0x7fffffffdb48) at dl-init.c:121 #5 0x00007ffff7fe5020 in _dl_start_user () from /lib64/ld-linux-x86-64.so.2 #6 0x0000000000000001 in ?? () #7 0x00007fffffffdf5c in ?? () #8 0x0000000000000000 in ?? () ```
Reproducibly without lto or graphite...?
iteration 1: IT HAPPENS when -O0 -march=native(verbosely) LTO graphite ggdb3 -frecord-gcc-switches(gentoo testing related) ``` MARCH_NATIVE_GCC="-march=alderlake -mabm -mno-cldemote -mno-kl -mno-pconfig -mno-sgx -mno-widekl -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=48 --param=l2-cache-size=30720" LTO_WARNINGS_GCC="-Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" LTO_FLAGS_GCC="-flto ${LTO_WARNINGS_GCC}" GCC_POLLY="-fgraphite-identity -floop-interchange -floop-strip-mine -floop-nest-optimize" DEBUG_FLAGS_GCC="-ggdb3" BECAUSE_PACKAGE_TESTING_WIKI_CF="-frecord-gcc-switches" BECAUSE_PACKAGE_TESTING_WIKI_LDF="-Wl,--defsym=__gentoo_check_ldflags__=0" COMMON_FLAGS="-O0 -pipe ${MARCH_NATIVE_GCC} ${GCC_POLLY} ${LTO_FLAGS_GCC} ${DEBUG_FLAGS_GCC} ${BECAUSE_PACKAGE_TESTING_WIKI_CF}" CFLAGS="${COMMON_FLAGS}" CXXFLAGS="${COMMON_FLAGS}" FCFLAGS="${COMMON_FLAGS}" FFLAGS="${COMMON_FLAGS}" LDFLAGS="${LDFLAGS} ${BECAUSE_PACKAGE_TESTING_WIKI_LDF}" ```
iteration 2: it doesn't happen when only -O0 -pipe -ggdb3 -frecord-gcc-switches
iteration 3: it doesn't happen when -O0 -ggdb3 -pipe + graphite_flags + -frecord-gcc-switches ``` GCC_POLLY="-fgraphite-identity -floop-interchange -floop-strip-mine -floop-nest-optimize" DEBUG_FLAGS_GCC="-ggdb3" BECAUSE_PACKAGE_TESTING_WIKI_CF="-frecord-gcc-switches" BECAUSE_PACKAGE_TESTING_WIKI_LDF="-Wl,--defsym=__gentoo_check_ldflags__=0" COMMON_FLAGS="-O0 -pipe ${DEBUG_FLAGS_GCC} ${GCC_POLLY} ${BECAUSE_PACKAGE_TESTING_WIKI_CF}" CFLAGS="${COMMON_FLAGS}" CXXFLAGS="${COMMON_FLAGS}" FCFLAGS="${COMMON_FLAGS}" FFLAGS="${COMMON_FLAGS}" LDFLAGS="${LDFLAGS} ${BECAUSE_PACKAGE_TESTING_WIKI_LDF}" ```
Iteration 4: IT HAPPENS when (iteration 3 + LTO) ``` LTO_WARNINGS_GCC="-Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" LTO_FLAGS_GCC="-flto ${LTO_WARNINGS_GCC}" GCC_POLLY="-fgraphite-identity -floop-interchange -floop-strip-mine -floop-nest-optimize" DEBUG_FLAGS_GCC="-ggdb3" BECAUSE_PACKAGE_TESTING_WIKI_CF="-frecord-gcc-switches" BECAUSE_PACKAGE_TESTING_WIKI_LDF="-Wl,--defsym=__gentoo_check_ldflags__=0" COMMON_FLAGS="-O0 -pipe ${DEBUG_FLAGS_GCC} ${GCC_POLLY} ${LTO_FLAGS_GCC} ${BECAUSE_PACKAGE_TESTING_WIKI_CF}" CFLAGS="${COMMON_FLAGS}" CXXFLAGS="${COMMON_FLAGS}" FCFLAGS="${COMMON_FLAGS}" FFLAGS="${COMMON_FLAGS}" LDFLAGS="${LDFLAGS} ${BECAUSE_PACKAGE_TESTING_WIKI_LDF}" ```
Iteration 5: IT HAPPENS when (iteration 2 + LTO) ``` LTO_WARNINGS_GCC="-Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" LTO_FLAGS_GCC="-flto ${LTO_WARNINGS_GCC}" DEBUG_FLAGS_GCC="-ggdb3" BECAUSE_PACKAGE_TESTING_WIKI_CF="-frecord-gcc-switches" BECAUSE_PACKAGE_TESTING_WIKI_LDF="-Wl,--defsym=__gentoo_check_ldflags__=0" COMMON_FLAGS="-O0 -pipe ${DEBUG_FLAGS_GCC} ${LTO_FLAGS_GCC} ${BECAUSE_PACKAGE_TESTING_WIKI_CF}" CFLAGS="${COMMON_FLAGS}" CXXFLAGS="${COMMON_FLAGS}" FCFLAGS="${COMMON_FLAGS}" FFLAGS="${COMMON_FLAGS}" LDFLAGS="${LDFLAGS} ${BECAUSE_PACKAGE_TESTING_WIKI_LDF}" ```
I assume it happens when LTO is enabled. Though LTO-related warnings are not triggered, that's interesting.
iteration 6: it doesn't happen when used my usual flags (-O3 -march=native(verbose) -ggdb3 +graphite +testing_related +lto ) with no LTO .
For 24.05.2, the tests pass for me with -O3 -march=native -mtls-dialect=gnu2 -flto=jobserver -fno-semantic-interposition wnt the -Werror=* flags as usual for LTO. Please try the latest version. If that fails, try narrow it down in a clean chroot.