Bug 697462

Summary: Ghostscript falls into infinite loop with pdfwrite
Product: Ghostscript Reporter: Till Kamppeter <till.kamppeter>
Component: PDF WriterAssignee: Chris Liddell (chrisl) <chris.liddell>
Status: RESOLVED FIXED    
Severity: normal CC: chris.liddell
Priority: P4    
Version: 9.19   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---
Attachments: test.ps

Description Till Kamppeter 2017-01-03 16:21:59 UTC
Created attachment 13272 [details]
test.ps

See

https://bugs.launchpad.net/ubuntu/+source/ghostscript/+bug/1653787

The poster of that bug writes:

----------
The following command never terminates, one CPU/thread up 100%:

gs -sDEVICE=pdfwrite -sOutputFile=test.pdf -f test.ps

This is more or less what

ps2pdf test.ps

does.

I have obtained this test case from an old debian bug report at the URL below, as I have originally encountered the problem with a *much larger* postscript file (214MB), which I've left running for 24 hours with no progress. I have attached both files.

Both files (the small one and the large one) get read by gv and displayed perfectly on screen.

Terminating the process with ctrl+c, output file is generated but contains no data.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=786827
----------

File test.ps attached, see the Ubuntu bug report for the 214 MB manual.ps file.
Comment 1 Chris Liddell (chrisl) 2017-01-09 02:42:14 UTC
Fixed in:
http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=8360852ef