Nicolas Williams
3f86e97f70
Fixup API to get closer to a libjq
2013-06-15 17:37:15 -05:00
Stephen Dolan
1741d8c161
Remove JQ_DEBUG #define and jq_test binary, simplifying build.
...
The debugging features previously available via JQ_DEBUG are now
command-line options.
2013-05-05 23:12:10 +01:00
Stephen Dolan
cedda2084d
Sneaky valgrind trick to detect stack memory issues.
...
After something is popped from a stack, we overwrite the memory
with uninitialised data (if JQ_DEBUG is on). This means that
valgrind reports use-after-pop as an uninitialised memory error.
2012-12-24 17:11:18 +00:00
Stephen Dolan
8dca3ef10d
Print an error message and abort in out-of-memory situations.
...
Closes #43 .
Tested with:
ulimit -v 5000
./jq -n -c 'def f(x): x,f([x,x]); f(0)'
2012-12-18 17:01:23 +00:00
Stephen Dolan
04daafbde3
Add wrappers for malloc/realloc/free. See #43 .
2012-12-18 16:53:51 +00:00