[trap-handler] Fix -Wshadow warnings
Bug: v8:12244,v8:12245 Change-Id: I6a449ec60a75d55715f04b9a57988c8a7caf038c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3227267 Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/main@{#77420}
This commit is contained in:
parent
5ee194a1a3
commit
55c1d2c52a
@ -59,10 +59,10 @@ bool TryFindLandingPad(uintptr_t fault_addr, uintptr_t* landing_pad) {
|
||||
// ProtectedInstructionData::instr_offset.
|
||||
TH_DCHECK(base + offset == fault_addr);
|
||||
|
||||
for (unsigned i = 0; i < data->num_protected_instructions; ++i) {
|
||||
if (data->instructions[i].instr_offset == offset) {
|
||||
for (unsigned j = 0; j < data->num_protected_instructions; ++j) {
|
||||
if (data->instructions[j].instr_offset == offset) {
|
||||
// Hurray again, we found the actual instruction.
|
||||
*landing_pad = data->instructions[i].landing_offset + base;
|
||||
*landing_pad = data->instructions[j].landing_offset + base;
|
||||
|
||||
gRecoveredTrapCount.store(
|
||||
gRecoveredTrapCount.load(std::memory_order_relaxed) + 1,
|
||||
|
@ -78,13 +78,13 @@ void ValidateCodeObjects() {
|
||||
if (data == nullptr) continue;
|
||||
|
||||
// Do some sanity checks on the protected instruction data
|
||||
for (unsigned i = 0; i < data->num_protected_instructions; ++i) {
|
||||
TH_DCHECK(data->instructions[i].instr_offset >= 0);
|
||||
TH_DCHECK(data->instructions[i].instr_offset < data->size);
|
||||
TH_DCHECK(data->instructions[i].landing_offset >= 0);
|
||||
TH_DCHECK(data->instructions[i].landing_offset < data->size);
|
||||
TH_DCHECK(data->instructions[i].landing_offset >
|
||||
data->instructions[i].instr_offset);
|
||||
for (unsigned j = 0; j < data->num_protected_instructions; ++j) {
|
||||
TH_DCHECK(data->instructions[j].instr_offset >= 0);
|
||||
TH_DCHECK(data->instructions[j].instr_offset < data->size);
|
||||
TH_DCHECK(data->instructions[j].landing_offset >= 0);
|
||||
TH_DCHECK(data->instructions[j].landing_offset < data->size);
|
||||
TH_DCHECK(data->instructions[j].landing_offset >
|
||||
data->instructions[j].instr_offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user