Entering cat /usr/share/cups/data/testprint.ps | gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=stcolor -r360x360 -dnoWeave -sDithering=gsmono -sOutputCode=runlength -sOutputFile=- - | cat -> x I get the file x with zero length. cat /usr/share/cups/data/testprint.ps | gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=stcolor -r360x360 -dnoWeave -sDithering=gsmono -sOutputCode=runlength -sOutputFile=x - produces a segmentation fault. This happens under Linux on both x86 32-bit and x86 64-bit.
Created attachment 3225 [details] CUPS 1.2.x test page, the test file used here This file was used by the commands shown above. Should be already available in all current Linux distros.
Also the simplified command line like in bug 689366 gs -sDEVICE=stcolor -r360x360 -dnoWeave -sDithering=gsmono -sOutputCode=runlength -sOutputFile=x -c showpage leads to a segfault on both 32-bit and 64-bit, already before the file x gets created.
I can reproduce with just debugobj/gs -sDithering=gsmono backtrace: #0 0x0000000000000000 in ?? () #1 0x00000000006da61c in cmap_gray_halftoned (gray=32760, pdc=0x1097ef8, pis=0x1096fd8, dev=0x1103718, select=gs_color_select_texture) at ./src/gxcmap.c:848 #2 0x00000000006d910a in gx_remap_DeviceGray (pc=<value optimized out>, pcs=<value optimized out>, pdc=0x1097ef8, pis=0x1096fd8, dev=0x1103718, select=gs_color_select_texture) at ./src/gxcmap.c:666 #3 0x00000000006daa89 in gx_remap_color (pgs=0x1096fd8) at ./src/gxcmap.c:538 #4 0x00000000006c6973 in gs_fillpage (pgs=0x1096fd8) at ./src/gspaint.c:78 #5 0x00000000004aa5a9 in zfillpage (i_ctx_p=<value optimized out>) at ./src/zpaint.c:48 #6 0x000000000047fcac in call_operator (op_proc=0x8e45c0 <cmap_few>, i_ctx_p=0x1097ef8) at ./src/interp.c:105
sorry, the minimal reproduction command line was debugobj/gs -sDEVICE=stcolor -sDithering=gsmono
Fixed with rev 8161.