[poppler] Bogus memory allocation size

suzuki toshiya mpsuzuki at hiroshima-u.ac.jp
Sat May 5 01:11:49 PDT 2012


# This is an interim report.

Now I'm testing the latest trunk, at:

	commit 753f6ab9347f972223ec21b7ed4b4f7ebed3d420
	Author: Albert Astals Cid <aacid at kde.org>
	Date:   Thu May 3 15:29:57 2012 -0700

	    Compile with ENABLE_PLUGINS defined

And the stracktrace when "Bogus memory allocation size" is
raised is following. objSize=567193 would be scaledHeight,
nObjs=16101 would be 3 times of scaledWidth=5367.

Yet I'm not sure what to do when the scaled image is too
huge to hold in single buffer.

Regards,
mpsuzuki

(gdb) run /dev/shm/page_1.pdf /dev/null
Starting program: /media/sdb/poppler-0.18.4/build-linux/utils/pdftoppm /dev/shm/page_1.pdf /dev/null
[Thread debugging using libthread_db enabled]

Breakpoint 1, gmallocn (nObjs=16101, objSize=567193, checkoverflow=false) at /media/usbdisk/redhat/BUILD/poppler-current/goo/gmem.cc:208
208         fprintf(stderr, "Bogus memory allocation size\n");
(gdb) where
#0  gmallocn (nObjs=16101, objSize=567193, checkoverflow=false) at /media/usbdisk/redhat/BUILD/poppler-current/goo/gmem.cc:208
#1  0x080ce4d1 in gmallocn (nObjs=16101, objSize=567193) at /media/usbdisk/redhat/BUILD/poppler-current/goo/gmem.cc:216
#2  0x080f87b0 in SplashBitmap::SplashBitmap (this=0x821d7c0, widthA=5367, heightA=567193, rowPadA=1, modeA=splashModeRGB8, alphaA=false,
    topDown=true) at /media/usbdisk/redhat/BUILD/poppler-current/splash/SplashBitmap.cc:103
#3  0x080f0780 in Splash::scaleImage (this=0x81fcb98, src=0x805aefa <SplashOutputDev::imageSrc(void*, SplashColorPtr, Guchar*)>,
    srcData=0xbfffea08, srcMode=splashModeRGB8, nComps=3, srcAlpha=false, srcWidth=21462, srcHeight=14384, scaledWidth=5367,
    scaledHeight=567193) at /media/usbdisk/redhat/BUILD/poppler-current/splash/Splash.cc:3805
#4  0x080efb84 in Splash::arbitraryTransformImage (this=0x81fcb98,
    src=0x805aefa <SplashOutputDev::imageSrc(void*, SplashColorPtr, Guchar*)>, srcData=0xbfffea08, srcMode=splashModeRGB8, nComps=3,
    srcAlpha=false, srcWidth=21462, srcHeight=14384, mat=0xbfffe9d8) at /media/usbdisk/redhat/BUILD/poppler-current/splash/Splash.cc:3627
#5  0x080ef437 in Splash::drawImage (this=0x81fcb98, src=0x805aefa <SplashOutputDev::imageSrc(void*, SplashColorPtr, Guchar*)>,
    srcData=0xbfffea08, srcMode=splashModeRGB8, srcAlpha=false, w=21462, h=14384, mat=0xbfffe9d8)
    at /media/usbdisk/redhat/BUILD/poppler-current/splash/Splash.cc:3502
#6  0x0805bd8e in SplashOutputDev::drawImage (this=0x81fca98, state=0x821d2c8, ref=0xbfffeca4, str=0x821daa0, width=21462, height=14384,
    colorMap=0x8233968, interpolate=false, maskColors=0x0, inlineImg=false)
    at /media/usbdisk/redhat/BUILD/poppler-current/poppler/SplashOutputDev.cc:3086
#7  0x08083358 in Gfx::doImage (this=0x82017f0, ref=0xbfffeca4, str=0x821daa0, inlineImg=false)
    at /media/usbdisk/redhat/BUILD/poppler-current/poppler/Gfx.cc:4561
#8  0x08081864 in Gfx::opXObject (this=0x82017f0, args=0xbfffed7c, numArgs=1)
    at /media/usbdisk/redhat/BUILD/poppler-current/poppler/Gfx.cc:4118
#9  0x080743c4 in Gfx::execOp (this=0x82017f0, cmd=0xbfffef1c, args=0xbfffed7c, numArgs=1)
    at /media/usbdisk/redhat/BUILD/poppler-current/poppler/Gfx.cc:857
#10 0x08073d88 in Gfx::go (this=0x82017f0, topLevel=true) at /media/usbdisk/redhat/BUILD/poppler-current/poppler/Gfx.cc:716
#11 0x08073bc4 in Gfx::display (this=0x82017f0, obj=0xbffff004, topLevel=true)
    at /media/usbdisk/redhat/BUILD/poppler-current/poppler/Gfx.cc:682
#12 0x080b0037 in Page::displaySlice (this=0x8201778, out=0x81fca98, hDPI=150, vDPI=150, rotate=0, useMediaBox=true, crop=false,
    sliceX=0, sliceY=0, sliceW=5396, sliceH=3596, printing=false, abortCheckCbk=0, abortCheckCbkData=0x0, annotDisplayDecideCbk=0,
    annotDisplayDecideCbkData=0x0) at /media/usbdisk/redhat/BUILD/poppler-current/poppler/Page.cc:519
#13 0x080b2ace in PDFDoc::displayPageSlice (this=0x8200000, out=0x81fca98, page=1, hDPI=150, vDPI=150, rotate=0, useMediaBox=true,
    crop=false, printing=false, sliceX=0, sliceY=0, sliceW=5396, sliceH=3596, abortCheckCbk=0, abortCheckCbkData=0x0,
    annotDisplayDecideCbk=0, annotDisplayDecideCbkData=0x0) at /media/usbdisk/redhat/BUILD/poppler-current/poppler/PDFDoc.cc:501
#14 0x0804c130 in savePageSlice (doc=0x8200000, splashOut=0x81fca98, pg=1, x=0, y=0, w=5396, h=3596, pg_w=5395.833333333333,
    pg_h=3595.8333333333335, ppmFile=0x82011a0 "/dev/null-1.ppm") at /media/usbdisk/redhat/BUILD/poppler-current/utils/pdftoppm.cc:196
#15 0x0804cf54 in main (argc=3, argv=0xbffff2a4) at /media/usbdisk/redhat/BUILD/poppler-current/utils/pdftoppm.cc:419



More information about the poppler mailing list