Bug 689946 - Regression: cluster regression 27-11.PS
Summary: Regression: cluster regression 27-11.PS
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Regression (show other bugs)
Version: master
Hardware: PC Linux
: P4 enhancement
Assignee: Ralph Giles
URL:
Keywords:
: 689945 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-07 21:39 UTC by Marcos H. Woehrmann
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
patch for userparams (1.66 KB, patch)
2008-07-08 14:49 UTC, Alex Cherepanov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos H. Woehrmann 2008-07-07 21:39:27 UTC
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.
Comment 1 Marcos H. Woehrmann 2008-07-07 21:39:41 UTC
Created attachment 4184 [details]
27-11.PS
Comment 2 Alex Cherepanov 2008-07-08 05:03:09 UTC
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:
Comment 3 Ray Johnston 2008-07-08 08:42:51 UTC
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

Comment 4 Ralph Giles 2008-07-08 11:02:04 UTC
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.
Comment 5 Ray Johnston 2008-07-08 14:26:52 UTC
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.
Comment 6 Ralph Giles 2008-07-08 14:34:33 UTC
In that case, should we just be running the cet suite without -dSAFER? What
about with gs_cet.ps?
Comment 7 Alex Cherepanov 2008-07-08 14:49:42 UTC
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.
Comment 8 Marcos H. Woehrmann 2008-07-08 19:56:45 UTC
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.
Comment 9 Ralph Giles 2008-07-09 10:47:41 UTC
I will update the cluster regression to run the cet files without -dSAFER.
Comment 10 Ralph Giles 2008-07-11 18:19:14 UTC
The cluster scripts have been updated to run the files in ps3cet in cet mode.
The relevent changes were committed in r8836.
Comment 11 Ralph Giles 2008-07-11 18:20:39 UTC
*** Bug 689945 has been marked as a duplicate of this bug. ***