about summary refs log tree commit diff
path: root/absl/debugging/failure_signal_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/debugging/failure_signal_handler.cc')
-rw-r--r--absl/debugging/failure_signal_handler.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/absl/debugging/failure_signal_handler.cc b/absl/debugging/failure_signal_handler.cc
index 6cecd93f9ba1..c2e56f9d819c 100644
--- a/absl/debugging/failure_signal_handler.cc
+++ b/absl/debugging/failure_signal_handler.cc
@@ -119,7 +119,11 @@ const char* FailureSignalToString(int signo) {
 #ifndef _WIN32
 
 static bool SetupAlternateStackOnce() {
+#if defined(__wasm__) || defined (__asjms__)
+  const size_t page_mask = getpagesize() - 1;
+#else
   const size_t page_mask = sysconf(_SC_PAGESIZE) - 1;
+#endif
   size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask;
 #if defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \
     defined(THREAD_SANITIZER)