mirror of
https://github.com/clearlinux/folly.git
synced 2026-09-01 02:34:43 +00:00
Disable ASAN for Fiber::init()
Summary: Fiber::init() method modifies all the bytes in the fiber's stack in order to produce a high watermark of stack memory usage. This behavior generates ASAN errors, as it modifies stack red zones. For that reason, ASAN is disabled for that particular method. Test Plan: Unit tests Reviewed By: alikhtarov@fb.com Subscribers: folly-diffs@, yfeldblum, chalfant FB internal diff: D2036280 Tasks: 6861962 Signature: t1:2036280:1430439550:e156e0e06fae3615d9d9204e99acaf3072bbfafd
This commit is contained in:
committed by
Praveen Kumar Ramakrishnan
parent
e4e2520ac4
commit
5cf352781a
@@ -23,6 +23,7 @@
|
||||
#include <cstring>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <folly/CPortability.h>
|
||||
#include <folly/Likely.h>
|
||||
#include <folly/Portability.h>
|
||||
#include <folly/experimental/fibers/BoostContextCompatibility.h>
|
||||
@@ -77,6 +78,8 @@ Fiber::Fiber(FiberManager& fiberManager) :
|
||||
fcontext_ = makeContext(limit, size, &Fiber::fiberFuncHelper);
|
||||
}
|
||||
|
||||
// It is necessary to disable ASAN because this function changes fiber's stack.
|
||||
FOLLY_DISABLE_ADDRESS_SANITIZER
|
||||
void Fiber::init(bool recordStackUsed) {
|
||||
recordStackUsed_ = recordStackUsed;
|
||||
if (UNLIKELY(recordStackUsed_ && !stackFilledWithMagic_)) {
|
||||
|
||||
Reference in New Issue
Block a user