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

avoid stackoverflow in deserialize #87

Merged
merged 1 commit into from
May 3, 2018
Merged

avoid stackoverflow in deserialize #87

merged 1 commit into from
May 3, 2018

Conversation

tanmaykm
Copy link
Member

Overriding deserialization of DArray introduced in #80 cause the below error:

xret = CapturedException(StackOverflowError(), Any[(deserialize(::SerializationState{IOStream}, ::Type{Dagger.DArray{Any,2,Base.#cat}}) at darray.jl:117, 100)])
DArray constructor: Error During Test
  Got an exception of type StackOverflowError outside of a @test
  StackOverflowError:
  Stacktrace:
   [1] deserialize(::SerializationState{IOStream}, ::Type{Dagger.DArray{Any,2,Base.#cat}}) at /home/tan/.julia/v0.6/Dagger/src/array/darray.jl:117 (repeats 20000 times)

Strangely the tests had passed then.

This is to avoid the stack overflow error. I did not find any other mechanism to invoke a specific method instance.

Also included a change in tests to have it pass when Dagger.use_shared_array[] == false.

Overriding deserialization of DArray introduced in #80 cause the below error:

```
xret = CapturedException(StackOverflowError(), Any[(deserialize(::SerializationState{IOStream}, ::Type{Dagger.DArray{Any,2,Base.#cat}}) at darray.jl:117, 100)])
DArray constructor: Error During Test
  Got an exception of type StackOverflowError outside of a @test
  StackOverflowError:
  Stacktrace:
   [1] deserialize(::SerializationState{IOStream}, ::Type{Dagger.DArray{Any,2,Base.#cat}}) at /home/tan/.julia/v0.6/Dagger/src/array/darray.jl:117 (repeats 20000 times)
```

Strangely the tests had passed then.

This is to avoid the stack overflow error. I did not find any other mechanism to invoke a specific method instance.

Also included a change in tests to have it pass when `Dagger.use_shared_array[] == false`.
@coveralls
Copy link

coveralls commented Apr 30, 2018

Coverage Status

Coverage increased (+0.2%) to 52.652% when pulling 5bf9ea9 on tan/scheduler into 25d6e00 on master.

@shashi shashi merged commit eff6f2a into master May 3, 2018
@shashi shashi deleted the tan/scheduler branch May 3, 2018 13:13
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

Successfully merging this pull request may close these issues.

None yet

3 participants