JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.92k stars 5.49k forks source link

Outputting a @ccallable function to an object file broken on master #35014

Closed KristofferC closed 4 years ago

KristofferC commented 4 years ago

MWE from test failure in PackageCompiler.jl

# callable.jlj
Base.@ccallable function f()::Cint
    return 0
end
run(`$(Base.julia_cmd()) --startup=no --output-o=sys.o ccallable.jl`)

prints:

Assertion failed: (Val && "isa<> used on a null pointer"), function doit, file /Users/kristoffercarlsson/julia/usr/include/llvm/Support/Casting.h, line 105.

signal (6): Abort trap: 6
in expression starting at /Users/kristoffercarlsson/julia/ccallable.jl:1
__pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line)
KristofferC commented 4 years ago

Bisected to https://github.com/JuliaLang/julia/pull/25984, cc @vtjnash