gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=new.pdf 4.pdf 4.pdf gdb: Program received signal SIGFPE, Arithmetic exception. 0x0000000000421da7 in ?? () As far as i could figure out, this is a division by zero exception. idiv %rbx where the %rbx register is 0. ------ [ebuild R ] app-text/ghostscript-gnu-8.16-r1 USE="X cjk cups gtk" Portage 2.1_pre5-r4 (default-linux/amd64/2005.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.15-gentoo-r7 x86_64) ================================================================= System uname: 2.6.15-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3200+ Gentoo Base System version 1.12.0_pre16 ccache version 2.4 [enabled] dev-lang/python: 2.4.2-r1 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=athlon64" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O2 -pipe -march=athlon64" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks sandbox sfperms strict" LANG="en_US.UTF-8" LC_ALL="et_EE.UTF-8" LDFLAGS="-Wl,-O2" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" USE="X aac acl alsa amd64 apm avi bash-completion bitmap-fonts bzip2 cairo cjk crypt cups dbus directfb divx4linux dri eds emboss encode fbcon ffmpeg flac foomaticdb fuse gif gimpprint gpm gstreamer gtk gtk2 gtkhtml hal hardened imagemagick imlib ithreads jpeg kde lzw lzw-tiff mjpeg mmap mng mozilla mp3 mpeg ncurses nogcj nomotif nptl ogg oggvorbis opengl pam pdflib perl pic png ppds python qt quicktime readline samba sdl ssl subversion svg sysfs tcpd theora threads tiff truetype truetype-fonts type1-fonts unicode usb userlocales vhosts vorbis wmf xinerama xml xml2 xmms xpm xprint xscreensaver xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_ati video_cards_radeon video_cards_nv video_cards_vesa" Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LINGUAS
Created attachment 81862 [details] pdf file causing the exception
I tried with gs-gnu-8.16-r2 wget http://bugs.gentoo.org/attachment.cgi?id=81862 -O 4.pdf gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=new.pdf 4.pdf 4.pdf gives no error, can you please try again with -r2?
(In reply to comment #2) > I tried with gs-gnu-8.16-r2 > > wget http://bugs.gentoo.org/attachment.cgi?id=81862 -O 4.pdf > gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=new.pdf 4.pdf 4.pdf > > gives no error, can you please try again with -r2? > Sure. Is it expected to appear in portage soon?
Try emerge sync :) It was only added an hour ago
(In reply to comment #4) > Try emerge sync :) > It was only added an hour ago > I hope one doesn't get banned syncing three times a day... Anyway, I still get the floating point exception with ghostscript-gnu-8.16-r2.
I guess this is amd64 <-> x86, can someone on amd64 please verify?
Also, can you please try afpl and esp to see if they also suffer from the bug?
(In reply to comment #7) > Also, can you please try afpl and esp to see if they also suffer from the bug? ghostscript-afpl-8.53-r4 and ghostscript-esp-8.15.1-r1 do not suffer from this bug.
hmh, seems a gs-gnu only bug. Can you please report this upstream at http://www.gnu.org/software/ghostscript/ghostscript.html#bug ? You are the on who can reproduce it :)
i can, on amd64: (gdb) run -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=new.pdf 4.pdf 4.pdf Starting program: /usr/bin/gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=new.pdf 4.pdf 4.pdf Program received signal SIGFPE, Arithmetic exception. 0x00000000004219c7 in MulDiv_Round (a=384, b=384, c=0) at ttcalc.c:93 93 a = ((Int64)a * b + c/2) / c; (gdb) bt #0 0x00000000004219c7 in MulDiv_Round (a=384, b=384, c=0) at ttcalc.c:93 #1 0x000000000042a841 in Instance_Reset (ins=0xb91cd0, debug=384) at ttobjs.c:757 #2 0x0000000000422192 in ttfFont__Open (tti=0xb91a78, this=0xb91928, r=0xb91cd0, nTTC=12130800, w=1000, h=1000, design_grid=1) at ttfmain.c:357 #3 0x000000000042b58a in ttfFont__Open_aux (this=0xb91928, tti=0xe9bb98, r=0xb91868, pfont=0xd42fe8, char_tm=0x180, log2_scale=0x0, design_grid=70) at gxttfb.c:394 #4 0x00000000005853a8 in gx_add_fm_pair (dir=0x93ecd0, font=0xd42fe8, puid=0x7fffff9f17c0, char_tm=0x7fffff9f1c60, log2_scale=0x7fffff9f1820, design_grid=1, ppair=0x180) at gxccman.c:241 #5 0x0000000000583b9e in gx_lookup_fm_pair (pfont=0xd42fe8, char_tm=0x7fffff9f1c60, log2_scale=0x7fffff9f1820, design_grid=1, ppair=0x7fffff9f1828) at gxccache.c:144 #6 0x000000000042181d in gs_type42_glyph_outline (font=0xd42fe8, WMode=0, glyph=984, pmat=0x7fffff9f1c60, ppath=0x7fffff9f1930) at gstype42.c:499 #7 0x0000000000570117 in gs_default_glyph_info (font=0xd42fe8, glyph=984, pmat=0x7fffff9f1c60, members=4, info=0x7fffff9f1b90) at gsfont.c:908 #8 0x0000000000420f6d in gs_type42_glyph_info_by_gid (font=0xd42fe8, glyph=984, pmat=0x7fffff9f1c60, members=13, info=0x7fffff9f1b90, glyph_index=0) at gstype42.c:538 #9 0x000000000053a9ea in pdf_compute_font_descriptor (pfd=0xd45e08) at gdevpdtd.c:408 #10 0x000000000053b1d9 in pdf_finish_FontDescriptor (pdev=0x9a6098, pfd=0xd45e08) at gdevpdtd.c:561 #11 0x0000000000545f69 in finish_font_descriptors (pdev=0x9a6098, finish_proc=0x53b1a0 <pdf_finish_FontDescriptor>) at gdevpdtw.c:568 #12 0x0000000000545faf in pdf_close_text_document (pdev=0x9a6098) at gdevpdtw.c:586 #13 0x000000000050afe3 in pdf_close (dev=0x180) at gdevpdf.c:1094 #14 0x000000000056b0b6 in gs_closedevice (dev=0x9a6098) at gsdevice.c:495 #15 0x0000000000451d3a in gs_main_finit (minst=0x7e0ea0, exit_status=0, code=-101) at imain.c:837 #16 0x00000000004054e6 in main (argc=8, argv=0x7fffff9f1fe8) at gs.c:94
!!! One of the following masked packages is required to complete your request: - app-text/ghostscript-gnu-8.16-r1 (masked by: package.mask) # Stefan Schweizer <genstef@gentoo.org> (19 Aug 2006) # No new upstream release for a long time, unexplained # bugs for ex. #131189, #125285, #129321, #131189 # Please use ghostscript-gpl or ghostscript-esp Don't think it's worth digging into this as it's probably going to be removed soon enough anyway.
This bug does not occur in ghostscript-gnu-8.55, which is the oldest version currently in portage. Thanks everyone. Closing.