Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
elf: Fix for mismatched app ELF file not detected.
The check that the app ELF file SHA256 matches the one stored in the core dump would never fail, leading to gdb loading the wrong ELF file and either crashing or producing misleading debug information. Specifics: The note_sec.name field was incorrectly read back as b'ESP_CORE_DUMP_INFO\x00E', because the namesz length includes the terminating NUL byte and possible junk padding bytes: https://github.com/espressif/esp-idf/blob/master/components/espcoredump/src/core_dump_elf.c#L212 In addition, as 'note_sec.name' is a bytes object Python 3 would have never successfully compared it with a string.
- Loading branch information