Files
jq/src
Nicolas Williams b52fc1043b Fix assert in generator subexpressions (fix #1875)
Expressions of the form `path(EXPR) | select(GENERATOR)`, where `EXPR`
is a path expression and `GENERATOR` is a generator conditional
expression (e.g., `has("a"), has("b")`) cause an assertion if the
jq_state VM is torn down too soon.  That assert() was only correct if
assuming that the conditional is not a generator.

If the conditional is generator, then what we see is that when
backtracking a SUBEXP_END is executed without a corresponding
SUBEXP_BEGIN because the entire conditional is bracketed with
SUBEXP_BEGIN and SUBEXP_END, and since it's resumed in the middle, in
between the brackets.

Rather than assert that the jq->path_len being restored has some
particular value, we can simply re-compute it from the restored
jq->path.
2019-03-26 18:58:55 -05:00
..
2015-08-23 20:36:11 -07:00
2015-08-23 20:36:11 -07:00
2015-08-23 20:36:11 -07:00
2015-08-23 20:36:11 -07:00
2015-08-23 20:36:11 -07:00
2015-08-23 20:36:11 -07:00
2015-08-23 20:36:11 -07:00
2015-08-23 20:36:11 -07:00
2017-04-21 18:41:06 -05:00
2015-08-23 20:36:11 -07:00
2015-08-23 20:36:11 -07:00
2018-08-17 23:23:10 -04:00
2017-03-30 11:46:03 -05:00
2015-08-23 20:36:11 -07:00
2017-04-21 18:41:06 -05:00
2015-08-23 20:36:11 -07:00
2018-08-17 23:15:48 -04:00
2019-03-24 23:23:16 -05:00
2019-03-24 23:23:16 -05:00
2015-08-23 20:36:11 -07:00