diff options
author | Aliaksey Kandratsenka <alkondratenko@gmail.com> | 2024-06-12 19:43:04 -0400 |
---|---|---|
committer | Aliaksey Kandratsenka <alkondratenko@gmail.com> | 2024-06-12 19:52:23 -0400 |
commit | 825b6638cf76aecc5a540d3fa662d157760fc11e (patch) | |
tree | 5ba2150dfcdc934502d0931d445dd4189324b4bc | |
parent | 7c736310f94bacdbe19cce8cc4944e71dcaa61f6 (diff) | |
download | google-perftools-825b6638cf76aecc5a540d3fa662d157760fc11e.tar.gz google-perftools-825b6638cf76aecc5a540d3fa662d157760fc11e.zip |
don't try to unit-test generic_fp on known-broken platforms
I.e. 32-bit legacy arm has broken frame pointers backtracing.
This fixes https://github.com/gperftools/gperftools/issues/1512
-rw-r--r-- | src/stacktrace.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/stacktrace.cc b/src/stacktrace.cc index 75575d6..2698b14 100644 --- a/src/stacktrace.cc +++ b/src/stacktrace.cc @@ -372,6 +372,23 @@ const char* TEST_bump_stacktrace_implementation(const char* suggestion) { // skip null implementation continue; } +#ifdef HAVE_GST_arm + if (get_stack_impl == &impl__arm) { + // "arm" backtracer is hopelessly broken. So don't test. We + // still ship it, though, just in case. + continue; + } +#endif // HAVE_GST_arm +#if defined(HAVE_GST_generic_fp) && (!__x86_64__ && !__i386__ && !__aarch64__ && !__riscv) + // Those "major" architectures have functional frame pointer + // backtracer and they're built with -fno-omit-frame-pointers + // -mno-omit-leaf-frame-pointer. So we do expect those tests to + // succeed. Everyone else (e.g. 32-bit legacy arm) is unlikely to + // pass. + if (get_stack_impl == &impl__generic_fp || get_stack_impl == &impl__generic_fp_unsafe) { + continue; + } +#endif // generic_fp && !"good architecture" break; } while (true); |