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

            Bug ID: 24017
           Summary: MCJit and thread_local hangs indefinitely
           Product: libraries
           Version: 3.6
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: MCJIT
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Created attachment 14547
  --> https://llvm.org/bugs/attachment.cgi?id=14547&action=edit
IR code of the bug

I tried to run this code via MCJit:

; ModuleID = 'ohm'
@Vv3ohm1xi = thread_local global i32 3

define i32 @main() #0 {
entry:
  %0 = load i32* @Vv3ohm1xi
  ret i32 %0
}

LLVMRunFunction and LLVMGetFunctionAddress seem to hang indefinitely for the
function `main`, while LLVMFindFunction returns a handle.

The same code with 

@Vv3ohm1xi = global i32 3

instead works as expected.

The default interpreter can run the code but does not initialize the global to
the set value (3 in this case). I can open a new issue for this problem if
wanted.


Steps to reproduce:
Save code to `bug.ir`
Run: `lli bug.ir` (I assume this uses the mc-jit)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to