Skip to content

Fix ARM panic when a code section has no mapping symbols#361

Open
SAY-5 wants to merge 1 commit into
encounter:mainfrom
SAY-5:fix-arm-empty-mapping-symbols
Open

Fix ARM panic when a code section has no mapping symbols#361
SAY-5 wants to merge 1 commit into
encounter:mainfrom
SAY-5:fix-arm-empty-mapping-symbols

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented Jun 2, 2026

get_mapping_symbols inserts an entry into disasm_modes for every code section, even when no $a/$t/$d mapping symbol points into it, so scan_instructions_internal got an empty slice from disasm_modes.get(..) instead of None and skipped the fallback_mappings path, then indexed the empty slice and panicked. This treats the empty case the same as a missing entry so it falls back to ARM mode. Fixes #352.

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
@SAY-5 SAY-5 force-pushed the fix-arm-empty-mapping-symbols branch from f16c187 to 2ff6adb Compare June 2, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Panic: index out of bounds in ARM arch process_code on ELF with no STT_FUNC symbols in .text

1 participant