Commit a37764af authored by inglorion's avatar inglorion Committed by Commit Bot

[Courgette] Fix disassembler_elf_32_arm on_32bit tracking code

Previously, we used bitwise operations on booleans to keep track of
whether we are 32-bit aligned. This code ran afoul of Clang's new
-Wbool-operation and didn't implement the intended behavior. This
change fixes the bug uncovered by the warning and implements the
intended logic using boolean operations.

Bug: 1011810
Change-Id: I4a7275a4e8da274115fa8ae85c90448c036200ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1846481Reviewed-by: default avatarSamuel Huang <huangs@chromium.org>
Reviewed-by: default avatarEtienne Pierre-Doray <etiennep@chromium.org>
Commit-Queue: Bob Haarman <inglorion@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703866}
parent 301f14e1
...@@ -524,7 +524,7 @@ CheckBool DisassemblerElf32ARM::ParseRel32RelocsFromSection( ...@@ -524,7 +524,7 @@ CheckBool DisassemblerElf32ARM::ParseRel32RelocsFromSection(
// 0 | 0 1 // 0 | 0 1
// 0 | 1 0 // 0 | 1 0
// 1 | 1 1 // 1 | 1 1
on_32bit = (~(on_32bit ^ (op_size == 4))) != 0; on_32bit = (on_32bit == (op_size == 4));
} else { } else {
// Move 2 bytes at a time, but track 32-bit boundaries // Move 2 bytes at a time, but track 32-bit boundaries
p += 2; p += 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment