Discussion:
[gs-bugs] [Bug 698708] - Ghostscript - Ghostscript loops
b***@artifex.com
2017-10-27 13:43:57 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698708

Bug ID: 698708
Summary: Ghostscript loops
Product: Ghostscript
Version: 9.22
Hardware: PC
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P4
Component: PDF Interpreter
Assignee: ***@artifex.com
Reporter: ***@gmail.com
QA Contact: gs-***@ghostscript.com
Word Size: ---

A PDF file (sent separately to Ken Sharp) causes regular build of Ghostscript,
versions 9.16 to 9.22 to loop when invoked via pdftops.

A debug build of 9.22 dies with "GCUnrecoverable error: undefined in
.currentglobal" when run with -DDEBUG

The file renders OK with 9.15 and 9.07.
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-10-27 14:10:55 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698708

--- Comment #1 from Ken Sharp <***@artifex.com> ---
Created attachment 14426
--> http://bugs.ghostscript.com/attachment.cgi?id=14426&action=edit
supplied test file

Partially debugged, the following is a reminder to me.

The file includes a large (616 bytes) /UF filespec. When writing this
(pdf_put_composite) we split the string, but it still exceeds 255 bytes, so we
try to split it again.

But there's a logic problem here, because we move 'start' to 'save' which is
the split point, then try to split the earlier part of the string. Because p is
< start now we can never exit the loop.

break at gdevpdfu.c, line 2176 :

if (*p == '/' || *p == '[' || *p == '{' || *p ==
'(' || *p == ' ') {
stream_write(pdev->strm, start, p - start);
stream_putc(pdev->strm, (byte)'\n');
width = 0;
start = p;

which is the first split and then follow from there.
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-11-16 13:40:43 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698708

Ken Sharp <***@artifex.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID

--- Comment #2 from Ken Sharp <***@artifex.com> ---
Commit b76dc2d704fcc00edc8c1fd8ae19d01a36e22c49 fixes this for me. There was a
logic error in the code that wrote the output, because ps2write (unlike
pdfwrite) tries to keep the width to < 256 characters.

Thanks for the report!
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-11-18 21:07:24 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698708

Hin-Tak Leung <***@users.sourceforge.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@users.sourceforge.net

--- Comment #3 from Hin-Tak Leung <***@users.sourceforge.net> ---
Hmm, curious why was this resolved "invalid" when it is acknowledged there was
a problem and a fixed was committed? has "invalid" become the default
resolution?
--
You are receiving this mail because:
You are the QA Contact for the bug.
Continue reading on narkive:
Search results for '[gs-bugs] [Bug 698708] - Ghostscript - Ghostscript loops' (Questions and Answers)
8
replies
How to split a .doc which is 300 individual pages long to single pdf files?
started 2010-04-26 02:56:55 UTC
software
Loading...