Skip to content

ARM core dump compiling inline asm. #25706

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 core dump compiling inline asm. #25706

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 25332
Version trunk
OS Linux
Blocks #19300
Attachments The failing ll file.
Reporter LLVM Bugzilla Contributor
CC @kbeyls,@rengolin

Extended Description

This may be related to bug 25330, but it has a different signature.
If I llc the included test case, I get a core dump, but no assertion.

[~] dev% ~/llvm-dir//bin/llc bugpoint-reduced-simplified.ll
#​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 0x11ebc4c (/home/rich/llvm-dir/bin/llc+0x11ebc4c)
#​5 0x11ecb0e (/home/rich/llvm-dir/bin/llc+0x11ecb0e)
#​6 0x11f3311 (/home/rich/llvm-dir/bin/llc+0x11f3311)
#​7 0x6090cb _init (/home/rich/llvm-dir/bin/llc+0x6090cb)
#​8 0x11f4fac (/home/rich/llvm-dir/bin/llc+0x11f4fac)
#​9 0x11f6993 (/home/rich/llvm-dir/bin/llc+0x11f6993)
#​10 0x18b7dd3 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/rich/llvm-dir/bin/llc+0x18b7dd3)
#​11 0x18b841b llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/rich/llvm-dir/bin/llc+0x18b841b)
#​12 0x69cd66 (/home/rich/llvm-dir/bin/llc+0x69cd66)
#​13 0x661848 main (/home/rich/llvm-dir/bin/llc+0x661848)
#​14 0x37bea1ffe0 __libc_start_main (/lib64/libc.so.6+0x37bea1ffe0)
#​15 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 'CodeGen Prepare' on function '@s2io_msix_ring_handle'
    

Segmentation fault (core dumped)

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@arsenm arsenm added the worksforme Resolved as "works for me" label Aug 15, 2023
@arsenm
Copy link
Contributor

arsenm commented Aug 15, 2023

Assuming the correct opaque pointer fix is to use elementtype(i8) here, this compiles fine now:

target datalayout = "e-m:e-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
target triple = "armv7-ellcc-linux"

%struct.XENA_dev_config.617.3692.6767.7382.8612.17836 = type { i64, i64, [240 x i8], i64, i64, i64, i64, i64, [1752 x i8], i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, [8 x i8], i64, i64, i64, [56 x i8], i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, [8 x i8], [8 x i64], i64, i64, i64, i64, i64, i64, i64, i64, i64, [40 x i8], i64, i64, i64, [1464 x i8], i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, [72 x i8], i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, [1416 x i8], i64, [248 x i8], i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, [120 x i8], i64, i64, i64, i64, i64, i64, [8 x i64], [8 x i64], i64, i64, i64, i64, i64, i64, i64, i64, [1296 x i8], i64, [248 x i8], i64, i64, i64, i64, i64, i64, i64, i64, [192 x i8], i64, i64, i64, i64, i64, i64, i64, i64, [8 x i8], i64, i64, i64, i64, i64, i64, i64, [8 x i64], i64, [4 x i64], i64, i64, i64, i64, i64, i64, i64, [1248 x i8], i64, [248 x i8], i64, i64, i64, i64, i64, [216 x i8], i64, i64, i64, i64, i64, [8 x i64], [152 x i8], i64, [24 x i8], i64, [24 x i8], i64, [24 x i8], i64, [24 x i8], i64, [120 x i8], i64, [88 x i8], i64, [728 x i8], i64, [24 x i8], i64, [152 x i8], i64, [248 x i8], i64, i64, i64, i64, i64, i64, i64, i64, [192 x i8], i64, i64, i64, i64, i64, i64, i64, i64 }

define void @s2io_msix_ring_handle() {
entry:
  br i1 undef, label %cleanup, label %if.end

if.end:                                           ; preds = %entry
  br i1 undef, label %if.else, label %if.then.6

if.then.6:                                        ; preds = %if.end
  %xmsi_mask_reg = getelementptr inbounds %struct.XENA_dev_config.617.3692.6767.7382.8612.17836, ptr undef, i32 0, i32 52
  %i = bitcast ptr %xmsi_mask_reg to ptr
  %add.ptr = getelementptr i8, ptr %i, i32 undef
  %tobool.i = icmp eq ptr undef, null
  br i1 %tobool.i, label %outer_sync.exit, label %if.then.i

if.then.i:                                        ; preds = %if.then.6
  call void undef()
  unreachable

outer_sync.exit:                                  ; preds = %if.then.6
  call void asm sideeffect "strb $1, $0", "=*Qo,r,*Qo"(ptr elementtype(i8) %add.ptr, i8 undef, ptr elementtype(i8) %add.ptr)
  %i1 = call i8 asm sideeffect "ldrb $1, $0", "=*Qo,=r,*Qo"(ptr elementtype(i8) %add.ptr, ptr elementtype(i8) %add.ptr)
  unreachable

if.else:                                          ; preds = %if.end
  unreachable

cleanup:                                          ; preds = %entry
  ret void
}

@arsenm arsenm closed this as completed Aug 15, 2023
@Endilll Endilll removed the worksforme Resolved as "works for me" label Aug 15, 2023
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

3 participants