bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/25270] New: objdump hangs on specific aarch64 opcode


From: chris.s.jones at gmail dot com
Subject: [Bug binutils/25270] New: objdump hangs on specific aarch64 opcode
Date: Tue, 10 Dec 2019 19:04:51 +0000

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

            Bug ID: 25270
           Summary: objdump hangs on specific aarch64 opcode
           Product: binutils
           Version: 2.33
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: chris.s.jones at gmail dot com
  Target Milestone: ---

Created attachment 12119
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12119&action=edit
Testcase

When trying to disassemble an AArch64 binary that contains an opcode of
0x452047a3, objdump will hang forever in this piece of code:

aarch64-dis.c:2843:
    case sve_size_tsz_bhs:
      i = extract_fields (inst->value, 0, 2, FLD_SVE_sz, FLD_SVE_tszl_19);
      while (i != 1)
        {
          if (i & 1)
            return FALSE;
          i >>= 1;
          variant += 1;
        }
      break;

Since the value of 'i' is zero, the loop never exits.  It looks like other
branches of this switch statement contain checks for (i == 0) prior to entering
the while loop.

Assembling the attached code with 'as' and then trying to disassemble the
resulting object file using 'objdump -d' should reproduce the problem:

% aarch64-linux-gnu-as -march=armv8-a ~/tmp/objdump-hang.s -o
/tmp/objdump-hang.o
% aarch64-linux-gnu-objdump -d /tmp/objdump-hang.o

Found using binutils 2.33.1

-- 
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]