Skip to content

unsafe pointers with non-isbits may crash #50125

Closed
@vtjnash

Description

@vtjnash

This is dead code (generated by inference), but we should make sure codegen doesn't crash on it. The problem is we are trying to store an FCA, which is not directly quite legal.

(gdb) p jl_dump_llvm_value(src.V)
  %value_phi1 = phi { i32, {} addrspace(10)* } 
$10 = void
(gdb) p jl_(src.typ)
OpenTelemetryAPI.SpanStatus
$11 = void

oolong-dev/OpenTelemetry.jl#80 (comment)

MWE:

julia> struct AA; a::Int; b::Union{Nothing,String}; end
julia> code_llvm((String,)) do x; unsafe_store!(Ptr{AA}(1), AA(0,x)); end

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorcompiler:codegenGeneration of LLVM IR and native code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions