<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Invalid scale in LEA crashes llvm-mc"
   href="https://bugs.llvm.org/show_bug.cgi?id=33861">33861</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Invalid scale in LEA crashes llvm-mc
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>MC
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>davide@freebsd.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Single-line testcase:

$ cat patatino.s
  lea RDX, [number * RAX + RBX + _foo]


Run:
$ ./llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel patatino.s
        .text

_test:
        xorl    %eax, %eax
        retq

number = 8
        .globl  _foo

        .globl  main
main:

llvm-mc: ../lib/Target/X86/AsmParser/X86Operand.h:551: static
std::unique_ptr<llvm::X86Operand> llvm::X86Operand::CreateMem(unsigned int,
unsigned int, const llvm::MCExpr*, unsigned int, unsigned int, unsigned int,
llvm::SMLoc, llvm::SMLoc, unsigned int, llvm::StringRef, void*, unsigned int):
Assertion `((Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8)) && "Invalid
scale!"' failed.
#0 0x000000000077c2ea llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(./llvm-mc+0x77c2ea)
#1 0x000000000077a23e llvm::sys::RunSignalHandlers() (./llvm-mc+0x77a23e)
#2 0x000000000077a38c SignalHandler(int) (./llvm-mc+0x77a38c)
#3 0x00007f2fc5d70c30 __restore_rt (/lib64/libpthread.so.0+0x10c30)
#4 0x00007f2fc48dc765 __GI_raise (/lib64/libc.so.6+0x34765)
#5 0x00007f2fc48de36a __GI_abort (/lib64/libc.so.6+0x3636a)
#6 0x00007f2fc48d4f97 __assert_fail_base (/lib64/libc.so.6+0x2cf97)
#7 0x00007f2fc48d5042 (/lib64/libc.so.6+0x2d042)
#8 0x0000000000506669 llvm::X86Operand::CreateMem(unsigned int, unsigned int,
llvm::MCExpr const*, unsigned int, unsigned int, unsigned int, llvm::SMLoc,
llvm::SMLoc, unsigned int, llvm::StringRef, void*, unsigned int)
(./llvm-mc+0x506669)
#9 0x0000000000509b00 (anonymous
namespace)::X86AsmParser::ParseIntelBracExpression(unsigned int, llvm::SMLoc,
long, bool, unsigned int) (./llvm-mc+0x509b00)
#10 0x000000000050af7e (anonymous namespace)::X86AsmParser::ParseIntelOperand()
(./llvm-mc+0x50af7e)
#11 0x000000000050ba88 (anonymous namespace)::X86AsmParser::ParseOperand()
(./llvm-mc+0x50ba88)
#12 0x000000000050cec4 (anonymous
namespace)::X86AsmParser::ParseInstruction(llvm::ParseInstructionInfo&,
llvm::StringRef, llvm::SMLoc,
llvm::SmallVectorImpl<std::unique_ptr<llvm::MCParsedAsmOperand,
std::default_delete<llvm::MCParsedAsmOperand> > >&) (./llvm-mc+0x50cec4)
#13 0x0000000000437ad6
llvm::MCTargetAsmParser::ParseInstruction(llvm::ParseInstructionInfo&,
llvm::StringRef, llvm::AsmToken,
llvm::SmallVectorImpl<std::unique_ptr<llvm::MCParsedAsmOperand,
std::default_delete<llvm::MCParsedAsmOperand> > >&) (./llvm-mc+0x437ad6)
#14 0x0000000000715a63 (anonymous
namespace)::AsmParser::parseStatement((anonymous
namespace)::ParseStatementInfo&, llvm::MCAsmParserSemaCallback*) [clone
.constprop.506] (./llvm-mc+0x715a63)
#15 0x0000000000718d1b (anonymous namespace)::AsmParser::Run(bool, bool)
(./llvm-mc+0x718d1b)
#16 0x000000000041718a main (./llvm-mc+0x41718a)
#17 0x00007f2fc48c8731 __libc_start_main (/lib64/libc.so.6+0x20731)
#18 0x0000000000431249 _start (./llvm-mc+0x431249)
Stack dump:
0.      Program arguments: ./llvm-mc -triple x86_64-unknown-unknown
-x86-asm-syntax=intel patatino.s
Aborted (core dumped)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>