Bug 690832

Summary: Warnings/crash when rendering ps2write output file
Product: Ghostscript Reporter: Ken Sharp <ken.sharp>
Component: Graphics LibraryAssignee: Henry Stiles <henry.stiles>
Status: RESOLVED FIXED    
Severity: normal CC: alex, chris.liddell, marcos.woehrmann
Priority: P4    
Version: master   
Hardware: PC   
OS: Windows NT   
Customer: Word Size: ---
Attachments: bug690832.ps
patch for zcolor.c indexed color space handling.

Description Ken Sharp 2009-10-20 03:49:22 UTC
While testing PCL->ps2write conversion I came up with this file, its the output
of ps2write. When run through a debug version of GS, using a debugger, it
produces a number of warnings of the form:

".\psi\igcstr.c(153): String pointer 0x....[768] outside [0x...0x...)"

When a debug version is run from teh command line the warnings occur followed by
a GPF (SEGV). The release version just gives a SEGV.

The call stack :

gc_string_mark()
gc_trace()
gs_gc_reclaim()
context_reclaim()
gs_vmreclaim()
ireclaim()
interp_reclaim()


The file runs normally through Acrobat Distiller and through Jaws, so I think
this is a genuine GS memory problem, but it is conceivable that the file is
incorrect.
Comment 1 Ken Sharp 2009-10-20 03:50:38 UTC
Created attachment 5508 [details]
bug690832.ps
Comment 2 Chris Liddell (chrisl) 2010-05-11 17:11:46 UTC
Created attachment 6276 [details]
patch for zcolor.c indexed color space handling.

This patch mirrors in the PS world what the PXL code does to create its equivalent of a indexed colour space with a lookup table in a string - see pxgstate.c around line 373-386.
Comment 3 Chris Liddell (chrisl) 2010-05-11 17:26:27 UTC
*** Bug 690356 has been marked as a duplicate of this bug. ***
Comment 4 Chris Liddell (chrisl) 2010-05-11 17:28:55 UTC
Issue resolved with r11221.
Comment 5 Marcos H. Woehrmann 2012-02-21 18:36:38 UTC
*** Bug 692868 has been marked as a duplicate of this bug. ***