Skip to content

ARM inline assembly causes a crash. #25704

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
llvmbot opened this issue Oct 28, 2015 · 1 comment
Closed

ARM inline assembly causes a crash. #25704

llvmbot opened this issue Oct 28, 2015 · 1 comment
Labels
backend:ARM bugzilla Issues migrated from bugzilla

Comments

@llvmbot
Copy link
Member

llvmbot commented Oct 28, 2015

Bugzilla Link 25330
Resolution FIXED
Resolved on Dec 04, 2017 12:14
Version trunk
OS Linux
Blocks #19300
Attachments The .ll file.
Reporter LLVM Bugzilla Contributor
CC @kbeyls,@rengolin

Extended Description

The attached .ll file, which was generated from a bugpoint reduction of a compiler crash while compiling the Linux kernel, causes llc to crash:

[~] dev% ~/llvm-dir/bin/llc bugpoint-reduced-simplified.ll
llc: /home/rich/llvm/include/llvm/CodeGen/SelectionDAGNodes.h:632: const llvm::SDValue& llvm::SDNode::getOperand(unsigned int) const: Assertion `Num < NumOperands && "Invalid child # of SDNode!"' failed.
#​0 0x19417a5 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/home/rich/llvm-dir/bin/llc+0x19417a5)
#​1 0x1940886 llvm::sys::RunSignalHandlers() (/home/rich/llvm-dir/bin/llc+0x1940886)
#​2 0x1940aa4 (/home/rich/llvm-dir/bin/llc+0x1940aa4)
#​3 0x37bf6100d0 __restore_rt (/lib64/libpthread.so.0+0x37bf6100d0)
#​4 0x37bea348d7 __GI_raise (/lib64/libc.so.6+0x37bea348d7)
#​5 0x37bea3653a __GI_abort (/lib64/libc.so.6+0x37bea3653a)
#​6 0x37bea2d47d __assert_fail_base (/lib64/libc.so.6+0x37bea2d47d)
#​7 0x37bea2d532 (/lib64/libc.so.6+0x37bea2d532)
#​8 0x5e032c _init (/home/rich/llvm-dir/bin/llc+0x5e032c)
#​9 0xc4bf66 (/home/rich/llvm-dir/bin/llc+0xc4bf66)
#​10 0xc4ff55 (/home/rich/llvm-dir/bin/llc+0xc4ff55)
#​11 0x10d770b llvm::SelectionDAGISel::DoInstructionSelection() (/home/rich/llvm-dir/bin/llc+0x10d770b)
#​12 0x10df839 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/home/rich/llvm-dir/bin/llc+0x10df839)
#​13 0x10e3ffe llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/home/rich/llvm-dir/bin/llc+0x10e3ffe)
#​14 0x10e5ab0 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/home/rich/llvm-dir/bin/llc+0x10e5ab0)
#​15 0xc55564 (/home/rich/llvm-dir/bin/llc+0xc55564)
#​16 0x18b7dd3 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/rich/llvm-dir/bin/llc+0x18b7dd3)
#​17 0x18b841b llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/rich/llvm-dir/bin/llc+0x18b841b)
#​18 0x69cd66 (/home/rich/llvm-dir/bin/llc+0x69cd66)
#​19 0x661848 main (/home/rich/llvm-dir/bin/llc+0x661848)
#​20 0x37bea1ffe0 __libc_start_main (/lib64/libc.so.6+0x37bea1ffe0)
#​21 0x695417 _start (/home/rich/llvm-dir/bin/llc+0x695417)
Stack dump:
0. Program arguments: /home/rich/llvm-dir/bin/llc bugpoint-reduced-simplified.ll

  1.  Running pass 'Function Pass Manager' on module 'bugpoint-reduced-simplified.ll'.
    
  2.  Running pass 'ARM Instruction Selection' on function '@optidma_init_one'
    

Abort (core dumped)

@llvmbot
Copy link
Member Author

llvmbot commented Dec 4, 2017

The following code is now produced and looks correct. Was likely fixed some time since then, so I'm going to resolve. I removed the unreachable and replaced with ret void for clarity.

movw	r0, #&#8203;501
movt	r0, #&#8203;65248
@APP
ldrb	r0, [r0]
@NO_APP
bx	lr

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:ARM bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

1 participant