mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-21 19:09:13 +00:00
panic: skip over the first invalid PC in case of InstrFetchProhibited
InstrFetchProhibited usually occurs because of a jump to an invalid pointer. In this case, PC in the exception frame is the address of the jump destination. 'esp_ptr_executable' check in print_backtrace function recognizes the first frame as invalid, and the backtrace is interrupted. This prevents the user from finding the location where the invalid pointer is dereferenced. Bypass the 'esp_ptr_executable' check if the exception cause is InstrFetchProhibited. Update the test case to no longer ignore this issue.
This commit is contained in:
@@ -107,10 +107,7 @@ def instr_fetch_prohibited_inner(env, test_name):
|
||||
with get_dut(env, test_name, "test_instr_fetch_prohibited") as dut:
|
||||
dut.expect_gme("InstrFetchProhibited")
|
||||
dut.expect_reg_dump(0)
|
||||
dut.expect("Backtrace:")
|
||||
# At the moment the backtrace is corrupted, need to jump over the first PC in case of InstrFetchProhibited.
|
||||
# Fix this and change expect to expect_none.
|
||||
dut.expect("CORRUPTED")
|
||||
dut.expect_backtrace()
|
||||
dut.expect_elf_sha256()
|
||||
dut.expect_none("Guru Meditation")
|
||||
dut.expect_none("CORRUPTED", "Guru Meditation")
|
||||
test_common(dut, test_name)
|
||||
|
||||
Reference in New Issue
Block a user