nvjpeg failed on phase one and just crash (segment fault) instead of returning an error code

I use https://github.com/NVIDIA/cuda-samples/tree/master/Samples/nvJPEG to decode some jpg images. I get segment fault when I decode this https://i.loli.net/2019/03/27/5c9b473910cab.jpg.

I’m using cuda 10.1 and GeForce GTX 1060 on ubuntu 14.04 lts.
The driver Version is 418.39.
I’m using batch mode,but using the single mode gets the same result.

GPU Device 0: "GeForce GTX 1060 6GB" with compute capability 6.1

Using GPU 0 (GeForce GTX 1060 6GB, 10 SMs, 2048 th/SM max, CC 6.1, ECC off)
Decoding images in directory: /data/workspace/nvjpeg/bad_jpg.txt, total 1, batchsize 1
Processing: /data/images/crash.jpg
Image is 3 channels.
Channel #0 size: 640 x 640
Channel #1 size: 640 x 640
Channel #2 size: 640 x 640
YUV 4:4:4 chroma subsampling
[1]    5161 segmentation fault (core dumped)  ./nvJPEG -i /data/workspace/nvjpeg/bad_jpg.txt
1 Like