Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger erroneously enters BigFloat constructor #343

Open
krsteffen opened this issue Mar 10, 2024 · 0 comments
Open

Debugger erroneously enters BigFloat constructor #343

krsteffen opened this issue Mar 10, 2024 · 0 comments

Comments

@krsteffen
Copy link

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

  • Save MWE to a file, say, mwe.jl
  • Open the Julia REPL
  • Invoke include("mwe.jl") in the REPL
  • In the Debugger prompt, invoke bp add function_we_want_to_inspect
  • Next (in Debugger prompt), invoke c

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

  • Julia 1.10.2
  • [31a5f54b] Debugger v0.7.8
  • I verified the (erroneous) result in a completely new Julia environment with no packages installed except ]add Debugger
  • I also downgraded to [31a5f54b] Debugger v0.7.0, restarted the Julia REPL, and reproduced the same erroneous result. Downgrading further was not possible due to unsatisfiable requirements detected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant