From: Christopher Dykes Date: Thu, 26 May 2016 19:25:43 +0000 (-0700) Subject: Disable the signal stack on Windows X-Git-Tag: 2016.07.26~200 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f2423568ba9c5da9553a7acfdf66d1d700e207b0;p=folly.git Disable the signal stack on Windows Summary: There is no equivalent functionality for Windows, so disable it completely. Reviewed By: andriigrynenko Differential Revision: D3348481 fbshipit-source-id: 52a104f5a8013113f54d5b10c2f0f9b720eeb4f6 --- diff --git a/folly/fibers/FiberManager-inl.h b/folly/fibers/FiberManager-inl.h index 003da1bd..3fe5b5f5 100644 --- a/folly/fibers/FiberManager-inl.h +++ b/folly/fibers/FiberManager-inl.h @@ -164,9 +164,11 @@ inline void FiberManager::runReadyFiber(Fiber* fiber) { } inline bool FiberManager::loopUntilNoReady() { +#ifndef _WIN32 if (UNLIKELY(!alternateSignalStackRegistered_)) { registerAlternateSignalStack(); } +#endif // Support nested FiberManagers auto originalFiberManager = this; diff --git a/folly/fibers/FiberManager.cpp b/folly/fibers/FiberManager.cpp index 727b7d7f..5c8373d0 100644 --- a/folly/fibers/FiberManager.cpp +++ b/folly/fibers/FiberManager.cpp @@ -277,6 +277,7 @@ static AsanUnpoisonMemoryRegionFuncPtr getUnpoisonMemoryRegionFunc() { #endif // FOLLY_SANITIZE_ADDRESS +#ifndef _WIN32 namespace { // SIGSTKSZ (8 kB on our architectures) isn't always enough for @@ -333,5 +334,6 @@ void FiberManager::registerAlternateSignalStack() { alternateSignalStackRegistered_ = true; } +#endif } } diff --git a/folly/fibers/FiberManager.h b/folly/fibers/FiberManager.h index a2474b62..117c26cb 100644 --- a/folly/fibers/FiberManager.h +++ b/folly/fibers/FiberManager.h @@ -468,9 +468,11 @@ class FiberManager : public ::folly::Executor { #endif // FOLLY_SANITIZE_ADDRESS +#ifndef _WIN32 bool alternateSignalStackRegistered_{false}; void registerAlternateSignalStack(); +#endif }; /**