Set new ARM64 context flags

Change-Id: I4749459ec37b076b226fa734824380a7254f1064
Reviewed-on: https://chromium-review.googlesource.com/1163826
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Joshua Peraza 2018-08-06 10:27:13 -07:00
parent f12b689789
commit 7b98edabb6

View file

@ -753,18 +753,10 @@ bool MinidumpContext::Read(uint32_t expected_size) {
Swap(&context_arm64->float_save.regs[fpr_index]); Swap(&context_arm64->float_save.regs[fpr_index]);
} }
} }
SetContextFlags(static_cast<uint32_t>(context_arm64->context_flags));
// Check for data loss when converting context flags from uint64_t into
// uint32_t
if (static_cast<uint64_t>(GetContextFlags()) !=
context_arm64->context_flags) {
BPLOG(ERROR) << "Data loss detected when converting ARM64 context_flags";
return false;
}
scoped_ptr<MDRawContextARM64> new_context(new MDRawContextARM64()); scoped_ptr<MDRawContextARM64> new_context(new MDRawContextARM64());
ConvertOldARM64Context(*context_arm64.get(), new_context.get()); ConvertOldARM64Context(*context_arm64.get(), new_context.get());
SetContextFlags(new_context->context_flags);
SetContextARM64(new_context.release()); SetContextARM64(new_context.release());
} else { } else {
uint32_t context_flags; uint32_t context_flags;