The fix for bug 699714 added this code: http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=5812b1b78fc4 The error handler reinstalls /.LockSafetyParams if anything goes wrong. I mentioned on IRC that I'm not sure if that stopped proc could itself stop (perhaps from stackoverflow). This bug is just a note to investigate if that's possible, I'll follow up if I can get a repro working or if I'm certain that's not the case. taviso> Hey, regarding the .trysetparams fix, is it possible the stopped proc could ever fail from /stackoverflow or something before it completes? taviso> like, you get the operand stack really close to being full, get that stopped proc called and handle /stackoverflow in the errordict...etc, etc
I got it to work, this still reproduces in HEAD (gs -dSAFER -sDEVICE=ppmraw): currentpagedevice /PageSize get 0 (foobar) put a0 % fill up the stack with junk 0 1 300360 {} for { grestore } stopped clear (ppmraw) selectdevice mark /OutputFile (%pipe%id) currentdevice putdeviceprops showpage Adjusting priority to Critical
Hmm, I must admit, I though we no longer enforced a hard limit on the stack size - I thought it was only limited by memory...
I've pushed changes to harden the fix against stack overflows: http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=13418541a5ae http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=643b24dbd002