Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix stack overflow in parseConditionalExpression
Summary: Both the consequent and alternate are subject to parsing stack overflows, since we call `parseAssignmentExpression` for both of them. However, we currently only check for recursion on the consequent path, which means that something like `a?b:a?b:a...` can cause an overflow. To repro: ``` echo "a" "?b:a"{1..10000} | bin/hermesc -dump-ast - Segmentation fault: 11 ``` Reviewed By: avp Differential Revision: D38667566 fbshipit-source-id: 1cf8364c3b00d7d85bdde6dac37d5159dd25aa5e
- Loading branch information