JuliaDebug / Debugger.jl

Julia debugger
MIT License
469 stars 43 forks source link

Debugger erroneously enters `BigFloat` constructor #343

Open krsteffen opened 6 months ago

krsteffen commented 6 months ago

Minimum working example (MWE)


function placeholder_function()
    sin(1.0)
end

function function_we_want_to_inspect()
    return ([1.0 -1.0; 1.0 1.0]/sqrt(2.0))*[1.0, 0.0]
end

function f()
    x = placeholder_function()
    y = BigFloat(1)
    function_we_want_to_inspect()
end

@enter f()

Instructions to replicate

Expected result

In function_we_want_to_inspect() at /home/steffen/mwe.jl:7
 7  function function_we_want_to_inspect()
>8      return ([1.0 -1.0; 1.0 1.0]/sqrt(2.0))*[1.0, 0.0]
 9  end

About to run: (tuple)(2, 2)

Actual result

In BigFloat(, ) at mpfr.jl:122
>122  function BigFloat(; precision::Integer=DEFAULT_PRECISION[])
 123      precision < 1 && throw(DomainError(precision, "`precision` cannot be less than 1."))
 124      nb = ccall((:mpfr_custom_get_size,libmpfr), Csize_t, (Clong,), precision)
 125      nb = (nb + Core.sizeof(Limb) - 1) ÷ Core.sizeof(Limb) # align to number of Limb allocations required for this
 126      #d = Vector{Limb}(undef, nb)

About to run: Core.NewvarNode(:(_4))

Version info