The cluster regression file, 27-11.PS, doesn't work with the current head (r8825) nor any previous version that I can find. The issue appears to be the -dSAFER that is used as part of the regression testing. The command line: bin/gs -sDEVICE=ppmraw -o test.ppm -dSAFER ./27-11.PS generates this error: AFPL Ghostscript CVS PRE-RELEASE 8.54 (2005-10-20) Copyright (C) 2005 artofcode LLC, Benicia, CA. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Loading NimbusSanL-Bold font from /home/marcos/Desktop/artifex/fonts/n019004l.pfb... 3613024 1699468 2486184 1191051 1 done. % _Pg checksums collected from AFPL Ghostscript CVS PRE-RELEASE version 3010 27-11 SYNTAX1 Loading NimbusRomNo9L-Regu font from /home/marcos/Desktop/artifex/fonts/n021003l.pfb... 3654240 1852975 2526552 1220013 1 done. 27-11 SYNTAX1 invalidaccess setuserparams * currentuserparams setuserparams 27-11 SYNTAX1 invalidaccess setuserparams * <<currentuserparams{}forall>>setuserparams 27-11 SYNTAX1 invalidaccess setuserparams * currentuserparams{<<3 -2 roll>>setuserparams}forall 27-11 SYNTAX1 = 17116 Text DevDep 0 ms %--Section 27-11 %--setuserparams %-- %-- %-- v---ERROR NAME %--invalidaccess %-- v---DURING COMMAND %--setuserparams %-- v---TOP OF OPERAND STACK AFPL Ghostscript CVS PRE-RELEASE 8.54: Unrecoverable error, exit code 1 Removing -dSAFER allows the file to render without error.
Created attachment 4184 [details] 27-11.PS
I agree that this is a bug. The following should work even in the safe mode. gs -dSAFER -c currentuserparams setuserparams GPL Ghostscript SVN PRE-RELEASE 8.63 (2008-03-01) Copyright (C) 2008 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Error: /invalidaccess in /setuserparams Operand stack:
Running this test with -dSAFER is invalid since it attempts to set all userparams and setting the 'PermitFile***' parameters is illegal in SAFER mode. It would be an enhancement to check if the value being set is the same as the current value, but that seems rather pointless. Assigning to Alex who can either close this as 'invalid' or fix it. Also changing this to 'enh'. Note the simplified sequence which shows where the error is occurring is: << currentuserparams { } forall >> % collect all userparams in a dict { 1 index = << 3 -2 roll >> setuserparams } forall % try setting all of them
I suggest we do "fix" this, even if it's a work around. Having the Quality Logic files in the regression suite is valuable, and just like it's good practice to work around sometimes warnings so the valid ones are more obvious, it's not helpful to have this file always failing.
While I don't object to Alex fixing this, I think that regression runs of the CET should _ONLY_ be considered valid in "correct" CPSI mode (without -dSAFER). Otherwise, 27-11.PS can be considered a validation of proper -dSAFER behavior by doing as it does now -- failing with invalidaccess.
In that case, should we just be running the cet suite without -dSAFER? What about with gs_cet.ps?
Created attachment 4185 [details] patch for userparams This patch permits setting 'PermitFile***' userparams to the same value as it had before. The patch is attached here to preserve the code. Safe mode changes many other parts of Ghostscript, for instance SystemParamsPassword handling. Making Ghostscript compatible with CET in the safe mode will require another round of CET testing. The fix is easy - run CET files in the standard mode and use gs_cet.ps prefix.
I'm reopening this as a reminder to either a) remove the offending file from the cluster regression or b) change the command line options so that it stops reporting an error. Having the cluster regressions report an error for this file every time it is run is annoying.
I will update the cluster regression to run the cet files without -dSAFER.
The cluster scripts have been updated to run the files in ps3cet in cet mode. The relevent changes were committed in r8836.
*** Bug 689945 has been marked as a duplicate of this bug. ***