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

These tests didn't do what you thought they did #227

Merged
merged 1 commit into from
Oct 27, 2020

Conversation

Keno
Copy link
Member

@Keno Keno commented Oct 27, 2020

The rng assignment inside the closure was actually reassigning the local rng,
which would then occaisionally segfault, because RandomDevice is immutable,
so there's nothing that actually rooted it to the device object.

Side note: Somebody should probably add assertions that the various things
we're trying to protect by rooting them in the context object are actually mutable.
However, I've spent too much time on this already so I'll leave that to somebody else ;).

The `rng` assignment inside the closure was actually reassigning the local `rng`,
which would then occaisionally segfault, because `RandomDevice` is immutable,
so there's nothing that actually rooted it to the device object.

Side note: Somebody should probably add assertions that the various things
we're trying to protect by rooting them in the context object are actually mutable.
However, I've spent too much time on this already so I'll leave that to somebody else ;).
Copy link
Member

@quinnj quinnj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wowza.....thanks for tracking this down; no doubt a huge pain. I wonder if a sufficiently smart linting pass would be able to track something like this down.

@quinnj quinnj merged commit d371375 into master Oct 27, 2020
@quinnj quinnj deleted the kf/notwhatyouthoughttheydid branch October 27, 2020 05:58
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.

2 participants