You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> ccall_mod = StaticCompiler.native_llvm_module(erf, (Float64,); demangle=true)
┌ Warning: Found pointer references to julia data
│ llvm instruction =%1= call double inttoptr (i64 140261382491264 to double (double)*)(double %0)
│ name =:erf
│ file =Symbol("/home/chriselrod/Documents/languages/juliarelease/usr/bin/../lib/libopenlibm.so")
│ line =-1
│ fromC =true
│ inlined =false
└ @ StaticCompiler ~/.julia/packages/StaticCompiler/Uki9T/src/pointer_warning.jl:59
┌ Warning: LLVM function generated warnings due to raw pointers embedded in the code. This will likely cause errors or undefined behaviour.
│ func =
│ define double @erf(double %0) local_unnamed_addr #0 {
│ top:
│ %1= call double inttoptr (i64 140261382491264 to double (double)*)(double %0)
│ ret double %1
│ }
│
└ @ StaticCompiler ~/.julia/packages/StaticCompiler/Uki9T/src/pointer_warning.jl:33
; ModuleID ='start'
source_filename ="start"
target datalayout ="e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple ="x86_64-redhat-linux"
define double @erf(double %0) local_unnamed_addr #0 {
top:%1= call double inttoptr (i64 140261382491264 to double (double)*)(double %0)
ret double %1
}
attributes #0 = { "frame-pointer"="all" }!llvm.module.flags =!{!0, !1}
!0 =!{i32 2, !"Dwarf Version", i32 4}
!1 =!{i32 2, !"Debug Info Version", i32 3}
because it is using a literal pointer in the generated code.
It seems like this should be okay with the ORC JIT, as we're using it in the same process as the host Julia process, so that pointer should be valid and stable.
But I'd like to check whether this should really be okay and the warning is spurious for this use case, or if there is something else I ought to be doing.
The text was updated successfully, but these errors were encountered:
Code like this works as intended (so long as you only have a single argument #152):
I get
However, it also emits the warning
because it is using a literal pointer in the generated code.
It seems like this should be okay with the ORC JIT, as we're using it in the same process as the host Julia process, so that pointer should be valid and stable.
But I'd like to check whether this should really be okay and the warning is spurious for this use case, or if there is something else I ought to be doing.
The text was updated successfully, but these errors were encountered: