glog: disable optimization-dependent stacktrace test

This test fails under GCC 16. It appears to be because it makes
assumptions that certain compiler optimizations do not occur. It clearly
is compiler-specific and tries to work around specific compiler
optimizations upstream. In particular, an analysis of the test
53d58e4531/src/stacktrace_unittest.cc (L218)
shows that it would be very plausible/correct for GCC to place labels
such that the `INIT_ADDRESS_RANGE` macro has `start` and `end` labels
that have the same address. While the functions are labeled NOINLINE,
interprocedural analysis could *plausibly* produce this result. While
we are not completely certain that this is the case, it seems likely
that this is not a genuine issue and just a questionable test.
This commit is contained in:
whispers
2026-07-04 00:25:31 -04:00
parent c465430f82
commit a06d109d48

View File

@@ -71,18 +71,22 @@ stdenv.mkDerivation (finalAttrs: {
checkPhase =
let
excludedTests =
lib.optionals stdenv.hostPlatform.isDarwin [
"mock-log"
]
++ [
"logging" # works around segfaults for now
]
++ lib.optionals (stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isBigEndian) [
# CHECK_STREQ failed: symbol == "non_inline_func" ((/build/source/build/symbolize_unittest+0x1000b840) vs. non_inline_func)
# TestWithPCInsideNonInlineFunction doesn't use TEST(), so can't exclude via GTEST_FILTER
"symbolize"
];
excludedTests = [
"logging" # works around segfaults for now
]
++ lib.optionals stdenv.hostPlatform.isGnu [
# Test appears to make strong assumptions about compiler optimizations
# that appear to be broken under GCC 16.
"stacktrace"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
"mock-log"
]
++ lib.optionals (stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isBigEndian) [
# CHECK_STREQ failed: symbol == "non_inline_func" ((/build/source/build/symbolize_unittest+0x1000b840) vs. non_inline_func)
# TestWithPCInsideNonInlineFunction doesn't use TEST(), so can't exclude via GTEST_FILTER
"symbolize"
];
excludedTestsRegex = lib.optionalString (
excludedTests != [ ]
) "(${lib.concatStringsSep "|" excludedTests})";