Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upJson decoding crashes the browser in 0.17 #571
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
evancz
closed this
Apr 27, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
Thanks for the report @ccapndave |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ccapndave commentedApr 27, 2016
I have found a case of Json decoding which causes the browser to crash (in fact it gets stuck in an infinite loop, the fan spins up and then you have to force quit it). This is the smallest test case I could come up with to reproduce it:
I did some debugging, and it looks like the cause is in
https://github.com/elm-lang/core/blob/dev/src/Native/Json.js#L239- in this case it seems thatproblem.tagisundefined, and so the browser gets stuck in this while loop forever.