Bug 692517

Summary: Regression: seg fault reading PostScript file
Product: Ghostscript Reporter: Marcos H. Woehrmann <marcos.woehrmann>
Component: GeneralAssignee: Michael Vrhel <michael.vrhel>
Status: NOTIFIED FIXED    
Severity: normal CC: hofer-gs
Priority: P2    
Version: master   
Hardware: PC   
OS: All   
Customer: 850 Word Size: ---

Description Marcos H. Woehrmann 2011-09-19 18:21:22 UTC
Ghostscript master (13028e7b90) seg faults when reading the attached PostScript file.  Older versions of Ghostscript (e.g. 8.54), Apple Preview, and Adobe Acrobat open the file without problem.

The command line I'm using:

  bin/gs -sDEVICE=ppmraw -o test.ppm ./58756.PS

I'm bisecting to find the responsible revision now.
Comment 2 Marcos H. Woehrmann 2011-09-20 00:10:21 UTC
The seg faults started with commit 6a82ae29ea4826048fc923388f4f59823e3a55c6:

Merge: 254698b 53e03bb
Author: Michael Vrhel <michael.vrhel@artifex.com>
Date:   Mon May 24 16:31:58 2010 +0000

    Merge of icc_work branch into trunk.
Comment 3 Michael Vrhel 2011-09-20 04:46:21 UTC
Interesting the icc table in the clist is screwed up for some reason.  Digging further into this now
Comment 4 Michael Vrhel 2011-09-20 05:06:09 UTC
Even more strange.  What we have is a pattern that is a clist.  Its icc_table which is stored in the clist is correctly read back.  Later during a memcpy during an install of an Halftone it is corrupted though.  I will dig more into this tomorrow.
Comment 5 Michael Vrhel 2011-09-21 00:01:12 UTC
Fixed with 

http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=36925c8f0864e8ecd54625011696d4bcdbc26fcc

issue was that a restore was blowing away the icc_table.  The table needed to allocated in stable memory so that it remains present in the presence of save and restore operations.
Comment 6 Henry Stiles 2011-09-28 20:27:12 UTC
*** Bug 691652 has been marked as a duplicate of this bug. ***