linux: initialize padding bytes in tests for msan

Bug: chromium:1281317
Change-Id: I83a50b851e9648e5270793c9149206103ac40ed1
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3350751
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
Joshua Peraza 2021-12-20 12:57:44 -08:00 committed by Crashpad LUCI CQ
parent 5cc0d543d0
commit 0ea32e0c7b

View File

@ -90,6 +90,9 @@ class StartHandlerForSelfTest
~StartHandlerForSelfTest() = default;
void SetUp() override {
// MSAN requires that padding bytes have been initialized for structs that
// are written to files.
memset(&options_, 0, sizeof(options_));
std::tie(options_.start_handler_at_crash,
options_.set_first_chance_handler,
options_.crash_non_main_thread,