Skip to content

Handle LLVM context error handler #514

@wsmoses

Description

@wsmoses

parsing an opaque pointer bitcode with non opaque poitner context exit's julia rrather than throwing an error to be caught.

cc @giordano @vchuravy

https://github.com/llvm/llvm-project/blob/ccc416312ed72e92a885425d9cb9c01f9afa58eb/llvm/lib/IR/LLVMContext.cpp#L251

error: Opaque pointers are only supported in -opaque-pointers mode (Producer: 'LLVM15.0.7' Reader: 'LLVM 15.0.7jl')

#0  __GI_exit (status=1) at ./stdlib/exit.c:137
#1  0x00007aea4f36e126 in llvm::LLVMContext::diagnose(llvm::DiagnosticInfo const&) () from /home/wmoses/.julia/juliaup/julia-1.10.9+0.x64.linux.gnu/bin/../lib/julia/libLLVM-15jl.so
#2  0x00007aea4f36e24f in llvm::LLVMContext::emitError(llvm::Twine const&) () from /home/wmoses/.julia/juliaup/julia-1.10.9+0.x64.linux.gnu/bin/../lib/julia/libLLVM-15jl.so
#3  0x00007aea4fddc319 in llvm::errorToErrorCodeAndEmitErrors(llvm::LLVMContext&, llvm::Error) () from /home/wmoses/.julia/juliaup/julia-1.10.9+0.x64.linux.gnu/bin/../lib/julia/libLLVM-15jl.so
#4  0x00007aea4fdd0c2b in LLVMParseBitcodeInContext2 () from /home/wmoses/.julia/juliaup/julia-1.10.9+0.x64.linux.gnu/bin/../lib/julia/libLLVM-15jl.so
#5  0x00007aea0e88f89b in julia_LLVMParseBitcodeInContext2_31821 () at /home/wmoses/.julia/packages/LLVM/2JPxT/lib/15/libLLVM.jl:228
#6  0x00007aea0e8aa87f in jfptr_LLVMParseBitcodeInContext2_31822 () from /home/wmoses/.julia/compiled/v1.10/Enzyme/G1p5n_EYKCz.so
#7  0x00007aea5484706e in _jl_invoke (world=<optimized out>, mfunc=0x7aea4b002220, nargs=3, args=0x7fff765bff68, F=0x7aea2f5b43b0 <jl_system_image_data+1663600>) at /cache/build/builder-amdci5-6/julialang/julia-release-1-dot-10/src/gf.c:2895
#8  ijl_apply_generic (F=<optimized out>, args=0x7fff765bff68, nargs=<optimized out>) at /cache/build/builder-amdci5-6/julialang/julia-release-1-dot-10/src/gf.c:3077
#9  0x00007aea24341dee in julia_parse_17843 () at /home/wmoses/.julia/packages/LLVM/2JPxT/src/core/module.jl:223
#10 0x00007aea2423c03f in macro expansion () at /home/wmoses/.julia/packages/LLVM/2JPxT/src/core/module.jl:236
#11 macro expansion () at /home/wmoses/.julia/packages/LLVM/2JPxT/src/base.jl:97
#12 julia_parse_17288 () at /home/wmoses/.julia/packages/LLVM/2JPxT/src/core/module.jl:235
#13 0x00007aea24313528 in jfptr_parse_17289 () from /home/wmoses/.julia/compiled/v1.10/GPUCompiler/yPwef_EYKCz.so
#14 0x00007aea5484706e in _jl_invoke (world=<optimized out>, mfunc=0x7aea4b786e00, nargs=2, args=0x7fff765c02d0, F=0x7aea3f452920 <jl_system_image_data+274912>) at /cache/build/builder-amdci5-6/julialang/julia-release-1-dot-10/src/gf.c:2895
#15 ijl_apply_generic (F=<optimized out>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions