[gs-bugs] [Bug 691014] execform1 rangecheck preventing printing...

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Thu May 13 16:53:54 UTC 2010


http://bugs.ghostscript.com/show_bug.cgi?id=691014

--- Comment #112 from Daniel J Blueman <daniel.blueman at gmail.com> 2010-05-13 16:53:45 UTC ---
Ok, the regression introduced in r11156 is due to cups->page_uses_transparency
always being 0 (guessing a bug), thus memory isn't (re)allocated when
transparency is used, causing the SEGV. When the argument wasn't passed, the
value consumed on the stack was non-zero, thus the transparency buffer was
always allocated. We avoid these SEGVs eg by passing in 1, ie:

cups/gdevcups.c:3367
if ((code = gdev_prn_maybe_realloc_memory((gx_device_printer *)pdev, &sp,
width_old, height_old, 1))

this fixes most of the issues seen, but obviously isn't the idea fix.

Running the testsuite again again r11234, I see some remaining different
issues, eg:

#0  memset () at ../sysdeps/x86_64/memset.S:564
#1  0x0000000000820214 in mem_true24_fill_rectangle (dev=0xffffffffffffffff,
x=<value optimized out>, y=<value optimized out>, 
    w=<value optimized out>, h=1, color=<value optimized out>) at
/usr/include/bits/string3.h:86
#2  0x00000000007de245 in gx_dc_pure_fill_rectangle (pdevc=<value optimized
out>, x=0, y=0, w=2975, h=1, dev=0x7ffff7e45068, lop=240, 
    source=0x0) at ./base/gxdcolor.c:414
#3  0x000000000046cf2a in image_render_color (penum_orig=0x1bbb4d8,
buffer=<value optimized out>, data_x=<value optimized out>, 
    w=<value optimized out>, h=<value optimized out>, dev=<value optimized
out>) at ./base/gxicolor.c:497
#4  0x00000000007f3291 in gx_image1_plane_data (info=0x1bbb4d8,
planes=0x7fffffffa660, height=<value optimized out>, 
    rows_used=<value optimized out>) at ./base/gxidata.c:208
#5  0x000000000056bf80 in pdf14_put_image (dev=<value optimized out>,
pis=<value optimized out>, target=<value optimized out>)
    at ./base/gdevp14.c:1407
#6  0x000000000056d72d in gx_update_pdf14_compositor (pdev=0x1396718,
pis=<value optimized out>, pdf14pct=<value optimized out>, 
    mem=<value optimized out>) at ./base/gdevp14.c:2280
#7  0x000000000056f0b2 in send_pdf14trans (pis=0xfe7298, dev=0x1396718,
pcdev=0x7fffffffc0d8, pparams=<value optimized out>, 
    mem=0xfc4bc8) at ./base/gdevp14.c:4645
#8  0x0000000000561bad in gs_state_update_pdf14trans (pgs=0x0,
pparams=0xffffffffffffffa0) at ./base/gstrans.c:203
#9  0x0000000000561c1a in gs_pop_pdf14trans_device (pgs=0x0) at
./base/gstrans.c:843
#10 0x00000000004e1e95 in interp (pi_ctx_p=<value optimized out>, pref=<value
optimized out>, perror_object=<value optimized out>)
    at ./psi/interp.c:1526
#11 0x00000000004e29fb in gs_call_interp (pi_ctx_p=0xfc46c8, pref=<value
optimized out>, user_errors=<value optimized out>, 
    pexit_code=<value optimized out>, perror_object=0x7fffffffd190) at
./psi/interp.c:484
#12 gs_interpret (pi_ctx_p=0xfc46c8, pref=<value optimized out>,
user_errors=<value optimized out>, pexit_code=<value optimized out>, 
    perror_object=0x7fffffffd190) at ./psi/interp.c:442
#13 0x00000000004d71b5 in gs_main_interpret (minst=<value optimized out>,
user_errors=-1, pexit_code=<value optimized out>, 
    perror_object=0x22dc) at ./psi/imain.c:240
#14 gs_main_run_string_end (minst=<value optimized out>, user_errors=-1,
pexit_code=<value optimized out>, perror_object=0x22dc)
    at ./psi/imain.c:556
#15 0x00000000004d840e in run_string (minst=0x0, str=0x0, options=3) at
./psi/imainarg.c:814
#16 0x00000000004d8c2a in runarg (minst=0xfc4630, pre=0x887b3d "", arg=<value
optimized out>, post=0x82fcb2 ".runfile", options=3)
    at ./psi/imainarg.c:805
#17 0x00000000004da5cc in gs_main_init_with_args (minst=0xfc4630, argc=23,
argv=0x7fffffffdd88) at ./psi/imainarg.c:215
#18 0x0000000000464ad6 in main (argc=23, argv=0x7fffffffdd88) at ./psi/gs.c:96

I'll upload these new testcases. For rastering speed (thus getting through the
test cases quicker), I'm using 360x360 resolution, ie:

$ export IPP_PORT=631 TMPDIR=/var/spool/cups/tmp
CUPS_FONTPATH=/usr/share/cups/fonts CUPS_DOCROOT=/usr/share/cups/doc-root
CUPS_SERVERROOT=/etc/cups SOFTWARE=CUPS/1.4.3 CUPS_FILETYPE=document
CUPS_CACHEDIR=/var/cache/cups DEVICE_URI=usb://EPSON/Stylus%20Photo%20R220
PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin
CUPS_REQUESTROOT=/var/spool/cups SERVER_ADMIN=root at exon
PPD=/etc/cups/ppd/Stylus-Photo-R220.ppd LANG=en.UTF-8 TZ=Europe/London
CUPS_ENCRYPTION=IfRequested HOME=/var/spool/cups/tmp
CUPS_DATADIR=/usr/share/cups PRINTER=Stylus-Photo-R220
FINAL_CONTENT_TYPE=printer/Stylus-Photo-R220 RIP_MAX_CACHE=930617k
PRINTER_LOCATION=exon CONTENT_TYPE=application/pdf PRINTER_INFO='EPSON Stylus
Photo R220' CUPS_SERVER=/var/run/cups/cups.sock CHARSET=utf-8
CUPS_STATEDIR=/var/run/cups CUPS_SERVERBIN=/usr/lib/cups
$ find PDFs -iname '*.eps' -o -iname '*.ps' -o -iname '*.pdf' -print -exec
gs/bin/gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=cups
-sstdout=%stderr -sOutputFile=%stdout -I/usr/share/cups/fonts
-sMediaClass=Standard -sMediaType=GlossyPhoto -r360x360 -dDEVICEWIDTHPOINTS=595
-dDEVICEHEIGHTPOINTS=842 -dcupsBitsPerColor=8 -dcupsColorOrder=0
-dcupsColorSpace=1 -dcupsRowFeed=10 -scupsPageSizeName=A4 -c -f -_ {} \;
</dev/null >/dev/null 2>&1

Remember you need to use this PPD and link the gs build dir to
/usr/share/ghostscript/8.72 in my configuration case. Let me know if you can't
reproduce SEGV with these testcases, and I'll work with you. Daniel

-- 
Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gs-bugs mailing list