[llvm-bugs] [Bug 44470] New: insn->consumedDisplacement is Overwritten Before Being Used

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jan 6 08:31:26 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=44470

            Bug ID: 44470
           Summary: insn->consumedDisplacement is Overwritten Before Being
                    Used
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: cameron.smith at pnnl.gov
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, spatel+llvm at rotateright.com

Created attachment 22992
  --> https://bugs.llvm.org/attachment.cgi?id=22992&action=edit
X86::readDisplacement()

In the file llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp in the
function readDisplacement (line 1235), insn->consumedDisplacement is set to
true on line 1245. In the proceeding switch statement, the same variable may be
set to false (if insn->eaDisplacement == EA_DSP_NONE), but the line immediately
after the switch (line 1269) always sets it back to true. I think this can be
fixed by removing line 1269. I've attached a copy of the function in question.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200106/9bbd6baf/attachment.html>


More information about the llvm-bugs mailing list