diff options
Diffstat (limited to 'absl')
-rw-r--r-- | absl/base/internal/exception_testing.h | 2 | ||||
-rw-r--r-- | absl/debugging/failure_signal_handler.cc | 17 | ||||
-rw-r--r-- | absl/strings/numbers_test.cc | 5 | ||||
-rw-r--r-- | absl/types/span_test.cc | 2 |
4 files changed, 13 insertions, 13 deletions
diff --git a/absl/base/internal/exception_testing.h b/absl/base/internal/exception_testing.h index fd89a3f6268f..0cf7918e4c67 100644 --- a/absl/base/internal/exception_testing.h +++ b/absl/base/internal/exception_testing.h @@ -35,7 +35,7 @@ EXPECT_DEATH(expr, ".*") #else #define ABSL_BASE_INTERNAL_EXPECT_FAIL(expr, exception_t, text) \ - EXPECT_DEATH(expr, text) + EXPECT_DEATH_IF_SUPPORTED(expr, text) #endif diff --git a/absl/debugging/failure_signal_handler.cc b/absl/debugging/failure_signal_handler.cc index 4c131fe07e90..d4b957bc2e41 100644 --- a/absl/debugging/failure_signal_handler.cc +++ b/absl/debugging/failure_signal_handler.cc @@ -252,7 +252,7 @@ ABSL_ATTRIBUTE_NOINLINE static void WriteStackTrace( depth, min_dropped_frames, symbolize_stacktrace, writerfn, writerfn_arg); } -// Called by FailureSignalHandler() to write the failure info. It is +// Called by AbslFailureSignalHandler() to write the failure info. It is // called once with writerfn set to WriteToStderr() and then possibly // with writerfn set to the user provided function. static void WriteFailureInfo(int signo, void* ucontext, @@ -278,9 +278,9 @@ static void PortableSleepForSeconds(int seconds) { } #ifdef ABSL_HAVE_ALARM -// FailureSignalHandler() installs this as a signal handler for +// AbslFailureSignalHandler() installs this as a signal handler for // SIGALRM, then sets an alarm to be delivered to the program after a -// set amount of time. If FailureSignalHandler() hangs for more than +// set amount of time. If AbslFailureSignalHandler() hangs for more than // the alarm timeout, ImmediateAbortSignalHandler() will abort the // program. static void ImmediateAbortSignalHandler(int) { @@ -294,11 +294,10 @@ using GetTidType = decltype(absl::base_internal::GetTID()); ABSL_CONST_INIT static std::atomic<GetTidType> failed_tid(0); #ifndef ABSL_HAVE_SIGACTION -static void FailureSignalHandler(int signo) { +static void AbslFailureSignalHandler(int signo) { void* ucontext = nullptr; #else -static void FailureSignalHandler(int signo, siginfo_t*, - void* ucontext) { +static void AbslFailureSignalHandler(int signo, siginfo_t*, void* ucontext) { #endif const GetTidType this_tid = absl::base_internal::GetTID(); @@ -308,10 +307,10 @@ static void FailureSignalHandler(int signo, siginfo_t*, std::memory_order_acq_rel, std::memory_order_relaxed)) { ABSL_RAW_LOG( ERROR, - "Signal %d raised at PC=%p while already in FailureSignalHandler()", + "Signal %d raised at PC=%p while already in AbslFailureSignalHandler()", signo, absl::debugging_internal::GetProgramCounter(ucontext)); if (this_tid != previous_failed_tid) { - // Another thread is already in FailureSignalHandler(), so wait + // Another thread is already in AbslFailureSignalHandler(), so wait // a bit for it to finish. If the other thread doesn't kill us, // we do so after sleeping. PortableSleepForSeconds(3); @@ -349,7 +348,7 @@ static void FailureSignalHandler(int signo, siginfo_t*, void InstallFailureSignalHandler(const FailureSignalHandlerOptions& options) { fsh_options = options; for (auto& it : failure_signal_data) { - InstallOneFailureHandler(&it, FailureSignalHandler); + InstallOneFailureHandler(&it, AbslFailureSignalHandler); } } diff --git a/absl/strings/numbers_test.cc b/absl/strings/numbers_test.cc index 8ebb090e76a6..27cc0479e341 100644 --- a/absl/strings/numbers_test.cc +++ b/absl/strings/numbers_test.cc @@ -711,8 +711,9 @@ TEST(stringtest, safe_strtou64_base_length_delimited) { } } -// feenableexcept() and fedisableexcept() are missing on Mac OS X, MSVC. -#if defined(_MSC_VER) || defined(__APPLE__) +// feenableexcept() and fedisableexcept() are missing on Mac OS X, MSVC, +// and WebAssembly. +#if defined(_MSC_VER) || defined(__APPLE__) || defined(__EMSCRIPTEN__) #define ABSL_MISSING_FEENABLEEXCEPT 1 #define ABSL_MISSING_FEDISABLEEXCEPT 1 #endif diff --git a/absl/types/span_test.cc b/absl/types/span_test.cc index 5a4f0014af38..fbce7e874798 100644 --- a/absl/types/span_test.cc +++ b/absl/types/span_test.cc @@ -288,7 +288,7 @@ TEST(IntSpan, Subspan) { #ifdef ABSL_HAVE_EXCEPTIONS EXPECT_THROW(absl::MakeSpan(ramp).subspan(11, 5), std::out_of_range); #else - EXPECT_DEATH(absl::MakeSpan(ramp).subspan(11, 5), ""); + EXPECT_DEATH_IF_SUPPORTED(absl::MakeSpan(ramp).subspan(11, 5), ""); #endif } |