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

unreasonable behavior after @exfiltrate #76

Closed
thudjx opened this issue May 28, 2022 · 1 comment
Closed

unreasonable behavior after @exfiltrate #76

thudjx opened this issue May 28, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@thudjx
Copy link

thudjx commented May 28, 2022

The mwe is:

function sum_f(ls::Vector{Float64})
    s = 0
    for x in ls
        s += f(x)
    end
    return s
end

function f(x::Float64)
    @infiltrate
    return sin(x)
end

ls = collect(range(0, stop=1, length=11))
sum_f(ls)

When I don't exfiltrate anything, the behavior at any point of @infiltrate is as expected:

infil> x
0.0
infil> @continue
infil> x
0.1
infil> @continue
infil> x
0.2

But if I @exfiltrate x, at the next point of @infiltrate, I cannot access x at this breaking point:

infil> @exfiltrate
Exfiltrating 1 local variable into the safehouse.
infil> @continue
infil> x
0.2
infil> @continue
infil> x
0.2

Although at this breaking point x is actually is:

infil> @locals
- x::Float64 = 0.4

I don't think this is deliberately designed to work like this, is it?

@pfitzseb pfitzseb added the bug Something isn't working label May 28, 2022
@pfitzseb
Copy link
Member

Yeah, it's not. Wanna give #77 a go?

@pfitzseb pfitzseb closed this as completed Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants