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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

infinite loop hashing Infinity #797

Closed
colbyr opened this issue Feb 24, 2016 · 3 comments
Closed

infinite loop hashing Infinity #797

colbyr opened this issue Feb 24, 2016 · 3 comments
Labels

Comments

@colbyr
Copy link

colbyr commented Feb 24, 2016

It seems that causing Immutable to hash Infinity triggers an infinite loop (makes sense I suppose 馃槒).

I can reproduce in Chrome and Firefox from the console on the doc site.

m = Immutable.Map({test: Infinity});
m.hasCode() // spins forever

I haven't really dug into the hasher. If it's not possible to hash infinity, I'd at least expect to see an exception.

cc @marcneuwirth

@samwgoldman
Copy link
Contributor

Haha, nice one. If hashing Infinity takes forever, does hashing -Infinity... reverse time? Let's not even try it just to be safe ;)

@leebyron leebyron added the bug label Apr 16, 2016
@leebyron
Copy link
Collaborator

Good find.

@colbyr
Copy link
Author

colbyr commented Apr 17, 2016

thanks @leebyron 馃憤

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants