Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5bba23b6 authored by Elliott Hughes's avatar Elliott Hughes Committed by Automerger Merge Worker
Browse files

Merge "debuggerd: recognize jumps to non-executable memory." into main am: 354bd064

parents 03f6896b 354bd064
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -356,6 +356,9 @@ static void dump_probable_cause(Tombstone* tombstone, unwindstack::AndroidUnwind
    auto map_info = maps->Find(fault_addr);
    auto map_info = maps->Find(fault_addr);
    if (map_info != nullptr && map_info->flags() == PROT_EXEC) {
    if (map_info != nullptr && map_info->flags() == PROT_EXEC) {
      cause = "execute-only (no-read) memory access error; likely due to data in .text.";
      cause = "execute-only (no-read) memory access error; likely due to data in .text.";
    } else if (fault_addr == target_thread.registers->pc() &&
               map_info != nullptr && (map_info->flags() & PROT_EXEC) == 0) {
      cause = "trying to execute non-executable memory.";
    } else {
    } else {
      cause = get_stack_overflow_cause(fault_addr, target_thread.registers->sp(), maps);
      cause = get_stack_overflow_cause(fault_addr, target_thread.registers->sp(), maps);
    }
    }