Bug 692288

Summary: Segmentation fault from foo2qpdl when driving Samsung CLP300 driver
Product: Ghostscript Reporter: Keith Refson <krefson>
Component: ColorAssignee: Michael Vrhel <michael.vrhel>
Status: RESOLVED FIXED    
Severity: normal CC: sphinx.pinastri
Priority: P4    
Version: 9.02   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---
Attachments: Original postscript file which does not cause a segfault
Processed PS file which causes gs to segfault

Description Keith Refson 2011-06-19 10:56:18 UTC
Created attachment 7602 [details]
Original postscript file which does not cause a segfault

Symptoms: Ghostscript 9.02 segfaults when attempting to print a variety of pages to a Samsung CLP300 printer when invoked via the "foo2qpdl" print driver script.
As a rough impression, some high colour pages cause the crash but this is not determined.  For example some Google Maps prints cause a crash but others do not.
Monochrome prints appear always to work.

My /var/log/messages indicates failures at a variety of addresses
Jun 19 11:12:22 HAL kernel: gs[25677]: segfault at ffffffff313d272e ip 00007f03c3a87e14 sp 00007fff68b24260 error 4 in libgs.so.9.02[7f03c360c000+5fc000]


I am attaching an example ps file which does cause a segfault when gs is invoked thusly

gs -q -dBATCH -dSAFER -dQUIET -dNOPAUSE -sPAPERSIZE=a4 -g9920x7016 -r1200x600 -sDEVICE=bitcmyk -dCOLORSCREEN -dMaxBitmap=500000000 '-sOutputFile=xyzxyz' GS_Crash_pp.ps

I have set the component to "colour" on the grounds than while the file "GS_Crash_pp.ps" causes gs to  segfault, gs succeeds on the version named "GS_Crash.ps".  The difference is textually very small - a "sethalftone" command added by the command "foo2zjs-pstops -n -w" as part of the "foow2qpdl-wrapper" script.

This does not appear to be a shack size limitation - gs segfaults irrespective of the "ulimit -s" value; neither does increasing "dMaxBitmap" help.


System: Mandriva 2011 linux x86_64 (Kernel 2.6.38.7-desktop-1mnb2) glibc 2.13
Comment 1 Keith Refson 2011-06-19 10:57:22 UTC
Created attachment 7603 [details]
Processed PS file which causes gs to segfault
Comment 2 Peter Cherepanov 2016-12-30 10:35:41 UTC
Current gs doesn't crash. This bug report can be closed.
Comment 3 Michael Vrhel 2017-01-01 09:54:37 UTC
Fixed at some point...