Summary: | Most japanese market printer drivers produce zero-length output/floating point exceptions | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Till Kamppeter <till.kamppeter> |
Component: | Printer Driver | Assignee: | Default assignee <ghostpdl-bugs> |
Status: | NOTIFIED FIXED | ||
Severity: | normal | CC: | htl10 |
Priority: | P4 | ||
Version: | master | ||
Hardware: | All | ||
OS: | All | ||
Customer: | Word Size: | --- | |
Attachments: |
CUPS test page with which the bug occurred
patch |
Description
Till Kamppeter
2007-07-25 13:46:17 UTC
Please attach the sample file. Different versions of cups may have different samples. Please also specify your platform and OS. This bug cannot happen on all platforms because x86 doesn't detect floating point exceptions and MS Windows doesn't dump core. This is on Ubuntu Gutsy 32-bit x86 Linux and Ubuntu Feisty 64-bit x86 Linux. On both systems I get the described results. Created attachment 3206 [details]
CUPS test page with which the bug occurred
Test page of CUPS 1.2.x as it comes with the current Ubuntu distributions. The
problem occurred with this test page.
The problem is reproduced on peeves with: gs -sDEVICE=rpdl -sOutputFile=x -c showpage The immediate cause of the crash is division by 0 in rpdl_print_page_copies( ...... ) { ..... int maxY = lprn->BlockLine / lprn->nBh * lprn->nBh; ..... } nBh seems to be initialised and a non-0 value is reported by currentpagedevice but it's value is 0 at the rendering time. Probably, the structure is only partly copied. Same behavior with the "bjc880j" driver: ------------------------------------------------------------------------------ till@till-desktop:~/printing-tests$ cat /usr/share/cups/data/testprint.ps | gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=bjc880j -sOutputFile=- - -sOutputFile=- - | cat -> x till@till-desktop:~/printing-tests$ ls -l x -rw-r--r-- 1 till till 0 2007-07-26 22:09 x till@till-desktop:~/printing-tests$ cat /usr/share/cups/data/testprint.ps | gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=bjc880j -sOutputFile=- - -sOutputFile=x - Floating point exception (core dumped) till@till-desktop:~/printing-tests$ ------------------------------------------------------------------------------ There are more drivers with this problem, here a list: - rpdl - bjc880v - lips4 - lips3 - lips2p - lips4v - lp2000 - escpage It seems that all drivers for japanese market laser printer vector PDLs are affected by this bug. Also - npdl is affected. Created attachment 3226 [details] patch Add a missing member to the initializer macro for the device structure of Japanese laser printer vector PDLs. Fix a FPE crash. Bug 689366. The patch is committed as a rev. 8146. |