Close #446.
Currently tested by disassembling and tracing various recursive jq
programs by hand under valgrind. An improved test framework that
can test for errors and specific bytecode patterns is in
development.
instead of lowercase ones.
According to RFC 3986,
The uppercase hexadecimal digits 'A' through 'F' are equivalent to
the lowercase digits 'a' through 'f', respectively. If two URIs
differ only in the case of hexadecimal digits used in percent-encoded
octets, they are equivalent. For consistency, URI producers and
normalizers should use uppercase hexadecimal digits for all percent-
encodings.
See https://github.com/stedolan/jq/issues/451 for details.
Test suite and manual are also updated to reflect this change.
Signed-off-by: Nicolas Williams <nico@cryptonector.com>
Instead of checking for self-recursion check that the thing we're
calling is a function and not a closure, therefore the new frame will
have the same env as the current frame.
jq now depends on oniguruma for regex support.
Modified configure.ac accordingly.
Added valgrind suppression file for oniguruma to prevent one-time and bounded
leaks from causing tests to fail.
Signed-off-by: Nicolas Williams <nico@cryptonector.com>
jv_get() doesn't know if it's being called in the context of a jq
program or not, so it can't produce a very useful error message when the
types of the to-be-indexed value and the key don't agree. For now,
including the key (when it is a short string) in the error message is as
significant an improvement as is easy to make.
Heuristic IEEE754 endianness autoconf detection
Use AC_C_BIGENDIAN, though it's not really the correct approach. Autoconf ought to have provided a test specifically for IEEE754 endianness, since it can differ from integer/pointer endianness!