The fix for 11-13, 11-26A, 12-13 and bug 520972
Alex Cherepanov <[email protected]> Wed, 16 Aug 2006 11:59:10 -0400
| Newsgroups | gmane.comp.printing.ghostscript.patches |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------030103070504000304070304
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Reviewers,
This patch partly reverses the change made for the bug 520972
http://cvs.ghostscript.com/cgi-bin/viewcvs.cgi/ghostscript/trunk/gs/src/zupath.c?rev=2453&r1=2241&r2=2453
Ghostscript now throws 'nocurrentpoint' error the same way as Adobe.
I don't understand why the following line is necessary:
refset_null(next, size); /*** Why it's needed ? ***/
Without this line a few files (for instance H00216q.pdf) fail with SEGV
in garbage collection.
With this line most crashes clear but a SEGV in mspro.pdf persists.
Regards,
Alex Cherepanov
--------------030103070504000304070304
Content-Type: text/plain;
name="12-13.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="12-13.diff"
Index: gs/src/zupath.c
===================================================================
--- gs/src/zupath.c (revision 6987)
+++ gs/src/zupath.c (working copy)
@@ -440,7 +440,7 @@
int size = (with_ucache ? 6 : 5);
gs_path_enum penum;
int op;
- ref *next;
+ ref *next, upath;
int code;
/* Compute the size of the user path array. */
@@ -465,12 +465,12 @@
}
}
}
- code = ialloc_ref_array(rupath, a_all | a_executable, size,
- "make_upath");
+ code = ialloc_ref_array(&upath, a_all | a_executable, size, "make_upath");
if (code < 0)
return code;
/* Construct the path. */
- next = rupath->value.refs;
+ next = upath.value.refs;
+ refset_null(next, size); /*** Why it's needed ? ***/
if (with_ucache) {
if ((code = name_enter_string(pgs->memory, "ucache", next)) < 0)
return code;
@@ -479,16 +479,8 @@
} {
gs_rect bbox;
- if ((code = gs_upathbbox(pgs, &bbox, true)) < 0) {
- /*
- * Note: Adobe throws 'nocurrentpoint' error, but the PLRM
- * not list this as a possible error from 'upath', so we
- * set a reasonable default bbox instead.
- */
- if (code != e_nocurrentpoint)
- return code;
- bbox.p.x = bbox.p.y = bbox.q.x = bbox.q.y = 0;
- }
+ if ((code = gs_upathbbox(pgs, &bbox, true)) < 0)
+ return code;
make_real_new(next, bbox.p.x);
make_real_new(next + 1, bbox.p.y);
make_real_new(next + 2, bbox.q.x);
@@ -543,6 +535,7 @@
++next;
}
}
+ ref_assign(rupath, &upath);
return 0;
}
--------------030103070504000304070304
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
gs-code-review mailing list
[email protected]
http://www.ghostscript.com/mailman/listinfo/gs-code-review
--------------030103070504000304070304--