Open jhnc opened 6 years ago
It is unsafe to use a gron | ungron pipeline. The gron from gron-linux-amd64-0.5.2.tgz seems to have a 65535 byte limit on input to gron --ungron which does not match the output limit of gron:
gron | ungron
gron
gron-linux-amd64-0.5.2.tgz
gron --ungron
$ perl -e 'print q({"blob":").(q(x) x 1000000000).qq("}\n)'|gron|sed 's/xx*/.../'|gron --ungron { "blob": "..." } $ perl -e 'print q({"blob":").(q(x) x 1000000000).qq("}\n)'|gron|perl -nle 'print length' 10 1000000015 $ perl -e 'print q({"blob":").(q(x) x 65521).qq("}\n)'|gron|perl -nle 'print length' 10 65536 $ perl -e 'print q({"blob":").(q(x) x 65521).qq("}\n)'|gron|gron --ungron failed to read input statements $ perl -e 'print q({"blob":").(q(x) x 65520).qq("}\n)'|gron|perl -nle 'print length' 10 65535 $ perl -e 'print q({"blob":").(q(x) x 65520).qq("}\n)'|gron|gron --ungron|sed 's/xx*/.../' { "blob": "..." }
Hi @jhnc!
Thanks for reporting this! And sorry I've not responded until now!
This is definitely a problem that needs to be sorted. Hopefully I'll have a fix for it soon :)
It is unsafe to use a
gron | ungron
pipeline. Thegron
fromgron-linux-amd64-0.5.2.tgz
seems to have a 65535 byte limit on input togron --ungron
which does not match the output limit ofgron
: