bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/31595] Abort in AArch64 disassembler's get_sreg_qualifier_


From: victorldn at sourceware dot org
Subject: [Bug binutils/31595] Abort in AArch64 disassembler's get_sreg_qualifier_from_value() function
Date: Mon, 08 Apr 2024 12:25:32 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=31595

--- Comment #3 from Victor Do Nascimento <victorldn at sourceware dot org> ---
So a trivial reproducer for the reported issue would be attempting to
disassemble `.inst 0x9dc39839'.

Looking at `readelf -S ./libc.so.6', we see that the crash happens within the
.gnu.hash section of the elf file.  This, combined with the fact we used the -D
flag when disassembling leads me to the conclusion that we're trying to
disassemble non-instruction bytes, which due to ill-luck, look an awful lot
like a valid instruction.

Only problem is, it differs from the relevant valid instruction by a
combination of three bits which would encode an invalid operand qualifier. We
thus get far enough into the disassembly of those 32 bits that objdump doesn't
know it should display undef or similar.

This thus seems like a quality of implementation issue. Normal disassembly of
executable sections of code appear to be functioning correctly, but I guess a
rethink is needed in terms of how assertions are used in disassembly.

My impression is that their use in a context such as in the use of `objdump
--disassemble-all` ought be predicated on whether or not we're disassembling in
a strictly executable code-only section of the object file or not...

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]