Bug 697462 - Ghostscript falls into infinite loop with pdfwrite
Summary: Ghostscript falls into infinite loop with pdfwrite
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: 9.19
Hardware: PC Linux
: P4 normal
Assignee: Chris Liddell (chrisl)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-03 16:21 UTC by Till Kamppeter
Modified: 2017-01-09 02:42 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
test.ps (54.56 KB, application/postscript)
2017-01-03 16:21 UTC, Till Kamppeter
Details

Note You need to log in before you can comment on or make changes to this bug.
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