Summary: | Ghostscript segfaults when rendering a certain PDF file with the CUPS Raster device in Page Mode | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Till Kamppeter <till.kamppeter> |
Component: | PDF Interpreter | Assignee: | Alex Cherepanov <alex> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | andyrtr, chris.liddell, christinedelight.top85, henry.stiles, jackie.rosen, michael.vrhel |
Priority: | P4 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | Linux | ||
Customer: | Word Size: | --- | |
Attachments: |
cv_libertine-evince.pdf
rx500.ppd out.raster log |
Description
Till Kamppeter
2010-09-02 09:37:54 UTC
Created attachment 6689 [details]
cv_libertine-evince.pdf
PDF file which causes the segfault.
Created attachment 6690 [details]
rx500.ppd
PPD file used when the segfault happened.
Created attachment 6691 [details]
out.raster
CUPS Raster output of the Ghostscript command line. Only a header gets written before the segfault happens.
Created attachment 6692 [details]
log
Debug logging output of the Ghostscript command line.
It works perfectly when not hardwiring the buffer size with RIP_MAX_CACHE, so it seems to be another problem of this cache-setting facility. Problems seems to be in the page mode. If I do not set RIP_MAX_CACHE but supply "-dMaxBitmap=16000000 -dBufferSpace=16000000" or lower, it works and I supply "-dMaxBitmap=32000000 -dBufferSpace=32000000" or higher, it fails. So Banding mode seems to be OK and Page mode seems to be broken. Original bug report from Ubuntu: https://bugs.launchpad.net/bugs/628030 Ghostscript is (at least currently) not able to work with hard-limited space parameters. It crashes with a segmentation fault on many input files then. Leaving the setting of these parameters fully automatic Ghostscript works just fine. As in most distributions (Currently all except Debian, Ubuntu, and their derivatives) CUPS imposes a hard limit via the RIP_MAX_CACHE environment variable, the only way to assure reliable working of Ghostscript is to ignore the parameter, leaving the space parameters in automatic mode. For CUPS this should be no regression, as print queues with other Ghostscript drivers (like pxlcolor, ljet4, ...) worked without hard limits all the time and no one complained. In Ghostscript 9.04 we will deactivate he cups_get_space_params() function in cups/gdevcups.c and will reactivate as soon as a real fix gets into place. Fixed properly in master: 3e07ccf224b0811b017fd41d1fdb24310240294a and gs904: e173d22697b5489624783a805311337d053e53fe |