tags 519640 + confirmed upstream
quit

Ryo Furue wrote:

> ps2pdf crashes:

Here's how it can be reproduced "in place" with upstream ghostscript.
Simplifications welcome.

Recipe:

        ... install ghostscript build-deps, ttf-sazanami-mincho, etc ...
        $ git clone git://git.ghostscript.com/ghostscript.git
        $ cd ghostscript/gs
        $ ./autogen.sh -C \
                --with-fontpath=/var/lib/ghostscript/fonts:\
/usr/share/cups/fonts:/usr/share/ghostscript/fonts:\
/usr/local/lib/ghostscript/fonts:/usr/share/fonts \
                --disable-compile-inits --prefix=/usr
        $ (cd /usr/share/ghostscript && ln -sT /tmp/ghostscript/gs 9.01)
        $ rm Resource/Init/cidfmap
        $ make -j2
        $ sed -i -e 's,exec "$GS_EXECUTABLE",exec gdb --args bin/gs,' 
lib/ps2pdfwr
        $ lib/ps2pdfwr ghostscript-ps2pdf-crash.ps

Result:

        Starting program: bin/gs -P- -dSAFER -q -P- -dNOPAUSE -dBATCH 
-sDEVICE=pdfwrite -sstdout=%stderr -sOutputFile=ghostscript-ps2pdf-crash.pdf 
-P- -dSAFER -c .setpdfwrite -f /tmp/ghostscript-ps2pdf-crash.ps
        [Thread debugging using libthread_db enabled]

        Program received signal SIGSEGV, Segmentation fault.
        pdf_set_charproc_attrs (pdev=0x89ca124, font=0x9d9b608, pw=0xbfffe140, 
narg=2, control=TEXT_SET_CHAR_WIDTH, ch=161)
            at ./base/gdevpdti.c:578
        578         pcp->owner_fonts = NULL;
        (gdb)

pcp (= pdev->accumulating_substream_resource) is null, hence the segfault.

Further reading:

        git log --follow -G pdf_set_charproc_attrs base/gdevpdti.c
        git log -G accumulating_substream_resource
        [one can instead use "git log -p" and grep by hand if using
         pre-1.7.4 git]

Well, that's a start.  Thanks again.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to