Summary: | procedure data target not always closed | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Chapman Flack <ghost> |
Component: | PS Interpreter | Assignee: | Ray Johnston <ray.johnston> |
Status: | NOTIFIED FIXED | ||
Severity: | major | ||
Priority: | P3 | ||
Version: | 8.51 | ||
Hardware: | PC | ||
OS: | NetBSD | ||
Customer: | Word Size: | --- |
Description
Chapman Flack
2005-10-06 18:39:09 UTC
Weird: in CVS diffs for zfproc.c, I don't see anything between 7.07 and 8.51 that looks like it could account for this - but I definitely never saw the problem before upgrading, and now it's entirely repeatable. Performing regression test (on Genoa test suite) with the patch: *************** *** 279,285 **** stream_proc_state *const ss = (stream_proc_state *) st; uint rcount = pr->limit - pr->ptr; ! if (rcount > 0) { uint wcount = r_size(&ss->data) - ss->index; uint count = min(rcount, wcount); --- 279,286 ---- stream_proc_state *const ss = (stream_proc_state *) st; uint rcount = pr->limit - pr->ptr; ! /* if 'last' return CALLC even when rcount == 0. ss->eof terminates */ ! if (rcount > 0 || (last && !ss->eof)) { uint wcount = r_size(&ss->data) - ss->index; uint count = min(rcount, wcount); ----------------------------------------------------------------------------- This definitely results in the 'false' call, producing: true() true(H) true(i) false() and *should* be OK for other proc_write usage. As the PLRM states, Encode filters are fairly rare, and procedure targets are a subset of those. I will examine the Genoa tests to see which, if any, of them tests this case. If no problems, I will commit. Patch committed. Testing showed no problems. |