Bug 689964 - Segfault with pkmraw
Summary: Segfault with pkmraw
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Images (show other bugs)
Version: master
Hardware: PC Linux
: P1 normal
Assignee: Alex Cherepanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-10 15:31 UTC by Ralph Giles
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Giles 2008-07-10 15:31:57 UTC
The following ps3cet files fail with a segfault with the pkmraw device:
12-02.PS, 12-07A.PS, 12-07C.PS.

Example command line:

bin/gs -sDEVICE=pkmraw -o /dev/null ../tests_private/ps/ps3cet/12-07C.PS

The crash also occurs when invoked in CET mode:

./bin/gs -q -I$HOME/fonts -dQUIET -dNOPAUSE -dBATCH -K1000000
-dMaxBitmap=30000000 -sDEVICE=pkmraw -r600
-sOutputFile="|md5sum>/tmp/12-07A.PS.md5" -dJOBSERVER lib/gs_cet.ps -
</b/02/atfxsw01/tests_private/ps/ps3cet/12-07A.PS

And at 600 dpi.

gdb reports the crash is inside the COLOR_SET_GRAY macro called from gximono.c:496
Comment 1 Ralph Giles 2008-07-10 15:32:43 UTC
Setting priority for segfault. Reproduced on x86 linux (cluster) and x86_64 linux.
Comment 2 Alex Cherepanov 2008-07-11 13:59:41 UTC
The crash first appears in the rev. 8829.

r8829 | giles | 2008-07-10 19:35:56 -0400 (Thu, 10 Jul 2008) | 3 lines
Move the interpolation image class from the ps2 dev to the core graphics
library so it is available to all languages.
Comment 3 Alex Cherepanov 2008-07-11 14:55:54 UTC
Apparently, 2_fracs image class was left out.
This fixes the crash for me.

Index: gs/src/lib.mak
===================================================================
--- gs/src/lib.mak      (revision 8833)
+++ gs/src/lib.mak      (working copy)
@@ -1153,7 +1153,7 @@
        $(ADDMOD) $(GLD)libx $(LIB8x)
        $(ADDMOD) $(GLD)libx $(LIB9x)
        $(ADDMOD) $(GLD)libx $(LIB10x)
-       $(ADDMOD) $(GLD)libx -imageclass 0_interpolate
+       $(ADDMOD) $(GLD)libx -imageclass 0_interpolate 2_fracs
        $(ADDMOD) $(GLD)libx -imageclass 1_simple 3_mono
        $(ADDMOD) $(GLD)libx -imagetype 1 mask1
Comment 4 Ralph Giles 2008-07-11 18:02:37 UTC
Fixed in r8835. Thanks for tracking things down, Alex.