Bug 688227

Summary: Always place gx_show_enum in local memory
Product: Ghostscript Reporter: Igor Melichev <igor.melichev>
Component: Graphics LibraryAssignee: Ken Sharp <ken.sharp>
Status: RESOLVED FIXED    
Severity: normal CC: christinedelight.top85, shailesh.mistry
Priority: P3 Keywords: bountiable
Version: 0.00   
Hardware: PC   
OS: Windows XP   
Customer: Word Size: ---

Description Igor Melichev 2005-07-21 02:50:15 UTC
Running 'show' in the global allocation mode while the current font is local, 
can cause a garbager crash due to gx_show_enum refers to current font.
Comment 1 Igor Melichev 2005-07-21 02:54:26 UTC
This problem is similar to Bug 688140 "A heap corruption in imagemask",
Bug 688145 "Segmentation fault : normal 244-01.ps (pkmraw/300/noband)"
Comment 2 Igor Melichev 2005-07-21 07:07:18 UTC
Related structure descriptors :
st_pnga_text_enum
st_gs_show_enum
st_gs_text_enum
Comment 3 Shailesh Mistry 2011-07-16 11:31:00 UTC
Bug still reproducible in Ghostscript 9.03
Comment 4 Ken Sharp 2012-02-08 15:08:05 UTC
Git commit 0816e3b87ec1843a31e3075a4fa382e844a46158, patch here:

http://ghostscript.com/pipermail/gs-cvs/2012-February/014164.html

should resolve this issue, though since there is no specimen file or reproduction method its impossible to tell for certain.

This alters the PostScript operators so that st_gs_show_enum structures are always allocated from local VM. I cannot find any mention of st_pnga_text_enum structures, if they ever existed they have gone now. st_gs_text_enum structures are only allocated from the trace device, and as far as I can tell use the VM mode supplied by the operator, so this will also always be in local VM now.