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

Anonymous functions that return anonymous functions error on deserialization. #21793

Closed
amitmurthy opened this issue May 11, 2017 · 0 comments
Closed
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@amitmurthy
Copy link
Contributor

Originally reported at #19456 (comment)
Reproducing below:

julia> y = (x) -> (() -> x)
(::#1) (generic function with 1 method)

julia> g = y(1)

julia> g()
1

julia> io = IOBuffer()
IOBuffer(data=UInt8[...], readable=true, writable=true, seekable=true, append=fa
lse, size=0, maxsize=Inf, ptr=1, mark=-1)

julia> serialize(io, y)

julia> seekstart(io)
IOBuffer(data=UInt8[...], readable=true, writable=true, seekable=true, append=fa
lse, size=316, maxsize=Inf, ptr=1, mark=-1)

julia> deserialize(io) # crashes

Going through the history of changes to base/serialize.jl, commit e3bec2a#diff-aec7b7bfc3115e923e4137ad38876951 is the first one that causes the above failure.

cc: @JeffBezanson

@amitmurthy amitmurthy added the bug Indicates an unexpected problem or unintended behavior label May 11, 2017
@JeffBezanson JeffBezanson self-assigned this May 11, 2017
JeffBezanson added a commit that referenced this issue May 12, 2017
fix #21793, regression in serializing nested closure
tkelman pushed a commit that referenced this issue May 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants