Jq: Crash when output redirected to /dev/null under mingw-64

Created on 10 Jul 2016  路  5Comments  路  Source: stedolan/jq

Hi.

I am attempting to use the slurp feature with a collection of filenames and receiving segmentation faults when using long filenames.

I noticed a similar issue (#1094) in relation to config filenames and wondered if my issue was fixed in the latest build as a result? However when I followed the windows "build" link to appveyor to try the latest build, the "artifacts" tab was empty. Is this the correct place to find the latest windows build?

Thanks for a great tool - the merge feature is a cool way to create an hierarchical override system for a collection of JSON configuration files, hence my use of the slurp function.

bug

Most helpful comment

Scratch previous comment - actually found problem was not long filenames but directing output to /dev/null that caused the segmentation fault. Have changed the issue title accordingly

All 5 comments

Scratch previous comment - actually found problem was not long filenames but directing output to /dev/null that caused the segmentation fault. Have changed the issue title accordingly

saved a lot of frustration.. bang on

Interesting.

This problem is occuring for me too, the command jq-win64.exe . input.json > NUL crashes the application for valid json. It does not crash for invalid json. It happens on jq v1.6 for me.

hi @ml019 @Mindavi
This bug has been fixed in the mater branch, you can try it again.

jq-version:master

Administrator@desktop-0005 MINGW64 /c/Users/Administrator/Desktop/jq/jq-master
# ./jq/jq.exe . test12345678974add_faq0000000wqweqacffaf
{
  "A": 1
}

Administrator@desktop-0005 MINGW64 /c/Users/Administrator/Desktop/jq/jq-master
# ./jq/jq.exe . test12345678974add_faq0000000wqweqacffaf  >nul

Was this page helpful?
0 / 5 - 0 ratings