Bug 692297

Summary: memory leakage in stringwidth operator with some type1 fonts if used with freetype
Product: Ghostscript Reporter: steve166
Component: Font APIAssignee: Chris Liddell (chrisl) <chris.liddell>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P4    
Version: 9.02   
Hardware: PC   
OS: Windows XP   
Customer: Word Size: ---
Attachments: ps testfile with type1 font calling stringwidth repeatedly

Description steve166 2011-06-22 16:13:55 UTC
Created attachment 7605 [details]
ps testfile with type1 font calling stringwidth repeatedly 

Hello,

During testing the fixes for Bug 692172 and 692127 (692290)
i noticed that since Ghostscript 9.02 the  gswin32c process
starts eating up all available memory when converting ps documents with
many pages using the pdfwrite or ps2write device.
I tracked this problem down to the stringwidth operator, when
used with some type1 fonts. This problem does not occur with Ghostcript
Versions <= 9.01 or if the -dDisableFAPI=true switch is used.
Please find attached a simple postcript program using one
of the problematic fonts and then calling repeatedly the
stringwidth operator.

Best regards,

steve166
Comment 1 Chris Liddell (chrisl) 2011-06-22 19:21:49 UTC
Fixed in commit:
3b3261eca08cd73ca355b28fe5125c98d411820d

You can see the diff:

http://ghostscript.com/pipermail/gs-cvs/2011-June/013035.html