From e6d1c032baa222d8a8dc87813e9067199ec0266d Mon Sep 17 00:00:00 2001 From: Gabriele Svelto Date: Tue, 11 Oct 2016 12:42:43 +0200 Subject: Fix iterating over the MDXStateFeature entries on 32-bit hosts On 32-bit hosts the new code for dumping version 5 of the MDRawMiscInfo structure uses a 32-bit left shift to select flags corresponding to the entries in the MDXStateFeature array. Since the array is made of 64 element this automatically skipped half of it. Change-Id: Ic4e3beaf6c56083524b33da9a396c14eec0d2bd2 Reviewed-on: https://chromium-review.googlesource.com/396107 Reviewed-by: Ted Mielczarek --- src/processor/minidump.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc index 1e1d386d..d7da7436 100644 --- a/src/processor/minidump.cc +++ b/src/processor/minidump.cc @@ -3759,7 +3759,7 @@ void MinidumpMiscInfo::Print() { printf(" xstate_data.enabled_features = 0x%" PRIx64 "\n", misc_info_.xstate_data.enabled_features); for (size_t i = 0; i < MD_MAXIMUM_XSTATE_FEATURES; i++) { - if (misc_info_.xstate_data.enabled_features & (1 << i)) { + if ((misc_info_.xstate_data.enabled_features >> i) & 1) { printf(" xstate_data.features[%02zu] = { %d, %d }\n", i, misc_info_.xstate_data.features[i].offset, misc_info_.xstate_data.features[i].size); -- cgit v1.2.1