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

Ensure the stack pointer is always used during RandomState init so different threads have different hashers. #14

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

orlp
Copy link
Owner

@orlp orlp commented Dec 14, 2024

Fixes #12.

@orlp orlp merged commit 2de875f into master Dec 19, 2024
@Imberflur
Copy link

Could we end up with the same seed by spawning a new thread after one ends so that we have the same stack address? If so, is this niche enough to not be a concern?

@orlp
Copy link
Owner Author

orlp commented Dec 19, 2024

I suppose, theoretically. We can solve this by adding a branch to initialize the thread-local variable with some global nondeterminism.

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.

Duplicate seeds across threads in RandomState with std feature?
2 participants