Summary: ASAN crashes on std::fill and doesn't respect no_sanitize_address attribute for some reason.
Test Plan: run fibers-test with ASAN
Reviewed By: stepan@fb.com
Subscribers: trunkagent, folly-diffs@, yfeldblum, chalfant
FB internal diff:
D2069437
Signature: t1:
2069437:
1431547972:
7d2c7a6547f8d76b309a76ef69fd19a1de4ce261
}
void Fiber::init(bool recordStackUsed) {
+// It is necessary to disable the logic for ASAN because we change
+// the fiber's stack.
+#ifndef FOLLY_SANITIZE_ADDRESS
recordStackUsed_ = recordStackUsed;
if (UNLIKELY(recordStackUsed_ && !stackFilledWithMagic_)) {
auto limit = fcontext_.stackLimit();
stackFilledWithMagic_ = true;
}
+#endif
}
Fiber::~Fiber() {
explicit Fiber(FiberManager& fiberManager);
- // It is necessary to disable ASAN because init() changes the fiber's stack.
- void init(bool recordStackUsed) FOLLY_DISABLE_ADDRESS_SANITIZER;
+ void init(bool recordStackUsed);
template <typename F>
void setFunction(F&& func);