[gs-cvs] rev 8815 - trunk/gs/src
leonardo at ghostscript.com
leonardo at ghostscript.com
Thu Jul 3 06:03:12 PDT 2008
Author: leonardo
Date: 2008-07-03 06:03:11 -0700 (Thu, 03 Jul 2008)
New Revision: 8815
Modified:
trunk/gs/src/gxclpath.c
Log:
Fix (clist writer) : Indeterminizm writing a degenerate curve.
DETAILS :
Bug 689911 Shifting raster data, Windows MSVC 8 non-debug build.
In function cmd_put_path the variable 'prev' was wrongly localized
in the loop body when need to save/pass data from the previous cycle.
It worked fine with debug build, because the compiler
always commits variables to RAM for debug purpose.
With release build the variable 'prev' never changes
because formally speaking the program never uses its value
after it is initialized.
The bug persists since the repository was created on March 9 2000.
The old behavior may be indeterministic.
With MSVC8 the effect is occasionaly visible when a degenerate curve
{x y x y x y x y} is written into clist.
See the simplified test case attached to the bug report.
EXPECTED DIFFERENCES :
None, but the old behavior may be indeterminiztic.
Modified: trunk/gs/src/gxclpath.c
===================================================================
--- trunk/gs/src/gxclpath.c 2008-07-01 10:22:25 UTC (rev 8814)
+++ trunk/gs/src/gxclpath.c 2008-07-03 13:03:11 UTC (rev 8815)
@@ -1195,6 +1195,7 @@
/* Information about the last emitted operation: */
int open = 0; /* -1 if last was moveto, 1 if line/curveto, */
+ struct { fixed vs[6]; } prev;
/* 0 if newpath/closepath */
@@ -1211,7 +1212,6 @@
set_first_point();
for (;;) {
fixed vs[6];
- struct { fixed vs[6]; } prev;
#define A vs[0]
#define B vs[1]
More information about the gs-cvs
mailing list