Bug 693222

Summary: Underflow crash may be we could recover
Product: Ghostscript Reporter: roucaries.bastien+gs
Component: PS InterpreterAssignee: Alex Cherepanov <alex>
Status: RESOLVED INVALID    
Severity: minor    
Priority: P4    
Version: 9.05   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---

Description roucaries.bastien+gs 2012-07-27 08:27:47 UTC
from: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=331327

gs -sDEVICE=nullpage
GPL Ghostscript 9.05 (2012-02-08)
Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>errordict /undefinedresult get exec
Unrecoverable error: stackunderflow in exch
Operand stack:
    --nostringval--
bastien@bastien-debian:/tmp$ echo $?
255

It will be nicer to not crash and report the underflow. User suggest:
1) Handle an error raised from inside the error-raising procedures better.
2) Make the error-raising procedures check for stack underflow.

Thanks

Bastien
Comment 1 Ray Johnston 2012-07-27 19:09:22 UTC
This is not a crash. If gs exits with an unrecoverable error because the
undefinedresult error handler has not been invoked correctly.

Please refain from posting bugs that do not result from real world PS or
PDF files.