make msan happy with exception_wrapper
Summary: When reading a `std::exception_ptr` out of a moved-from `folly::exception_wrapper`, we end up reading a `std::exception_ptr` field of a deleted `ExceptionPtr` object. This was causing MSAN much consternation. The fix is to test for emptiness in `to_exception_ptr` and return a default-constructed `std::exception_ptr`. This commit also adds extra test cases, since `to_exception_ptr` does something slightly different depending on whether the `exception_wrapper` object is `const` or not. Reviewed By: yfeldblum Differential Revision: D19403528 fbshipit-source-id: fde74a5c4b2ddb2025703432c1ac5a19d26b9426
Showing
Please register or sign in to comment