From: Andrii Grynenko Date: Tue, 6 Dec 2016 23:11:57 +0000 (-0800) Subject: Increase fiber stack size if UBSAN is enabled X-Git-Tag: v2016.12.12.00~17 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=99994d0a2550e5de567f855bcb9d35f3a69b309a;p=folly.git 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 --- 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. */