Summary: | gs stalls, never returns on attached figure | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | keinbiervorvier <keinbiervorvier> |
Component: | PS Interpreter | Assignee: | Ken Sharp <ken.sharp> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P4 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | Linux | ||
Customer: | Word Size: | --- | |
Attachments: | fig4b.eps |
Description
keinbiervorvier
2009-03-02 15:06:59 UTC
Created attachment 4822 [details]
fig4b.eps
gs (X11) does not completely display this figure and does not return
The problem was introduced in rev. 8962. Intriguing... The job provokes a stackoverflow in the setcolor routines. These are handled in a continuation procedure, but because the overflow is detected after the continuation procedure is pushed on to the execution stack, GS returns to the continuation afterwards. This causes the infinite loop, because the stack frame is no longer valid for a setcolor. This patch fixes the problem for me, I'm just running a regression test before I commit it (NB I checked the other continuation routines and found another potential case): Index: zcolor.c =================================================================== --- zcolor.c (revision 9503) +++ zcolor.c (working copy) @@ -3725,11 +3725,11 @@ * so that our continuation is ahead of the sub-proc's continuation. */ check_estack(1); + push(1); /* The push_op_estack macro increments esp before use, so we don't need to */ push_op_estack(devicencolorants_cont); make_int(pstage, 1); - push(1); *op = space[1]; code = zsetcolorspace(i_ctx_p); if (code != 0) @@ -5606,6 +5606,8 @@ * so that our continuation is ahead of the sub-proc's continuation. */ check_estack(1); + /* May need to push a /Device... name on the stack so make sure we have space */ + check_ostack(1); /* The push_op_estack macro increments esp before use, so we don't need to */ push_op_estack(setdevicecolor_cont); Fixed in revision 9519 with this patch: http://ghostscript.com/pipermail/gs-cvs/2009-March/009094.html |