From 99994d0a2550e5de567f855bcb9d35f3a69b309a Mon Sep 17 00:00:00 2001 From: Andrii Grynenko Date: Tue, 6 Dec 2016 15:11:57 -0800 Subject: [PATCH] Increase fiber stack size if UBSAN is enabled Summary: UBSAN instrumentation results in more stack being used. Applying the same logic we already have for ASAN there. Reviewed By: igorsugak Differential Revision: D4287455 fbshipit-source-id: 1a224cb5a3654c23b15fa298bf80476234a1418c --- folly/fibers/FiberManagerInternal-inl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/folly/fibers/FiberManagerInternal-inl.h b/folly/fibers/FiberManagerInternal-inl.h index fa526288..68c9a2ac 100644 --- a/folly/fibers/FiberManagerInternal-inl.h +++ b/folly/fibers/FiberManagerInternal-inl.h @@ -37,8 +37,8 @@ namespace fibers { namespace { inline FiberManager::Options preprocessOptions(FiberManager::Options opts) { -#ifdef FOLLY_SANITIZE_ADDRESS - /* ASAN needs a lot of extra stack space. +#if defined(FOLLY_SANITIZE_ADDRESS) || defined(UNDEFINED_SANITIZER) + /* ASAN/UBSAN needs a lot of extra stack space. 16x is a conservative estimate, 8x also worked with tests where it mattered. Note that overallocating here does not necessarily increase RSS, since unused memory is pretty much free. */ -- 2.34.1