Bug 13322 - non-embedded PDF fonts cause segfault
Summary: non-embedded PDF fonts cause segfault
Status: RESOLVED INVALID
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86 (IA32) All
: medium major
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-20 11:28 UTC by Soren Harward
Modified: 2007-11-28 06:25 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
file that causes segfault when viewed in xpdf (27.73 KB, application/octet-stream)
2007-11-20 11:29 UTC, Soren Harward
Details

Description Soren Harward 2007-11-20 11:28:59 UTC
When viewing the attached PDF in XPDF, libfontconfig segfaults trying to fill in the non-embedded fonts.  I have filed a bug upstream with fontconfig (because it shouldn't segfault at all), but Poppler is probably calling the library improperly in the first place.

Here's the stack trace:

#0  0xb76a1832 in FcConfigSubstituteWithPat () from /usr/lib/libfontconfig.so.1
#1  0xb76a1f35 in FcConfigSubstitute () from /usr/lib/libfontconfig.so.1
#2  0xb7ed5dbb in GlobalParams::getDisplayFont () from /usr/lib/libpoppler.so.2
#3  0xb7e89eeb in SplashOutputDev::doUpdateFont () from /usr/lib/libpoppler.so.2
#4  0xb7e8a1ac in SplashOutputDev::drawChar () from /usr/lib/libpoppler.so.2
#5  0xb7eafa4b in Gfx::doShowText () from /usr/lib/libpoppler.so.2
#6  0xb7eb04d6 in Gfx::opShowSpaceText () from /usr/lib/libpoppler.so.2
#7  0xb7ead3f1 in Gfx::execOp () from /usr/lib/libpoppler.so.2
#8  0xb7ead5ba in Gfx::go () from /usr/lib/libpoppler.so.2
#9  0xb7eadb43 in Gfx::display () from /usr/lib/libpoppler.so.2
#10 0xb7ef34d6 in Page::displaySlice () from /usr/lib/libpoppler.so.2
#11 0xb7ef59c7 in PDFDoc::displayPageSlice () from /usr/lib/libpoppler.so.2
[... xpdf functions removed ...]
Comment 1 Soren Harward 2007-11-20 11:29:51 UTC
Created attachment 12652 [details]
file that causes segfault when viewed in xpdf
Comment 2 Soren Harward 2007-11-20 11:32:36 UTC
Upstream bug (in libfontconfig): https://bugs.freedesktop.org/show_bug.cgi?id=13321
Comment 3 Carlos Garcia Campos 2007-11-21 02:02:58 UTC
I can't reproduce the crash with evince. 
Comment 4 Gerben Vos 2007-11-22 12:29:28 UTC
Here's another PDF which gives this crash (I'll give a link instead of attaching it, because it is quite large): http://vanveelen.xs4all.nl/documenten/gramcord.pdf

Here's my stack backtrace:

Program received signal SIGSEGV, Segmentation fault.
0xb7628558 in IA__FcConfigSubstituteWithPat (config=0x3ff00000, p=0x81551c8, 
    p_pat=0x0, kind=FcMatchPattern) at fccfg.c:1296
1296    fccfg.c: No such file or directory.
        in fccfg.c
Current language:  auto; currently c
(gdb) bt
#0  0xb7628558 in IA__FcConfigSubstituteWithPat (config=0x3ff00000, 
    p=0x81551c8, p_pat=0x0, kind=FcMatchPattern) at fccfg.c:1296
#1  0xb7628be5 in IA__FcConfigSubstitute (config=0x3ff00000, p=0x81551c8, 
    kind=FcMatchPattern) at fccfg.c:1512
#2  0xb7e4e1cb in GlobalParams::getDisplayFont (this=0x8089008, font=0x811fbb0)
    at GlobalParams.cc:1089
#3  0xb7e02e6b in SplashOutputDev::doUpdateFont (this=0x80e3ca0, 
    state=0x812d5f0) at SplashOutputDev.cc:999
#4  0xb7e0312c in SplashOutputDev::drawChar (this=0x80e3ca0, state=0x812d5f0, 
    x=<value optimized out>, y=<value optimized out>, dx=7.1999999999999993, 
    dy=0, originX=0, originY=0, code=49, nBytes=1, u=0xbfd419fc, uLen=1)
    at SplashOutputDev.cc:1277
#5  0xb7e27d0b in Gfx::doShowText (this=0x8119218, s=0x8139190) at Gfx.cc:3290
#6  0xb7e28adf in Gfx::opMoveShowText (this=0x8119218, args=0xbfd41b24, 
    numArgs=1) at Gfx.cc:3097
#7  0xb7e255d1 in Gfx::execOp (this=0x8119218, cmd=0xbfd41cb0, 
    args=0xbfd41b24, numArgs=<value optimized out>) at Gfx.cc:726
#8  0xb7e2579a in Gfx::go (this=0x8119218, topLevel=1) at Gfx.cc:594
#9  0xb7e25d23 in Gfx::display (this=0x8119218, obj=0xbfd41d8c, topLevel=1)
    at Gfx.cc:557
#10 0xb7e6b8d6 in Page::displaySlice (this=0x8106d18, out=0x80e3ca0, 
    hDPI=81.235154394299286, vDPI=81.235154394299286, rotate=0, useMediaBox=0, 
    crop=1, sliceX=0, sliceY=0, sliceW=671, sliceH=950, printing=0, 
    catalog=0x80ff248, abortCheckCbk=0, abortCheckCbkData=0x0, 
    annotDisplayDecideCbk=0, annotDisplayDecideCbkData=0x0) at Page.cc:406
#11 0xb7e6ddc7 in PDFDoc::displayPageSlice (this=0x80fe828, out=0x80e3ca0, 
    page=1, hDPI=81.235154394299286, vDPI=81.235154394299286, rotate=0, 
    useMediaBox=0, crop=1, printing=0, sliceX=0, sliceY=0, sliceW=671, 
    sliceH=950, abortCheckCbk=0, abortCheckCbkData=0x0, 
    annotDisplayDecideCbk=0, annotDisplayDecideCbkData=0x0) at PDFDoc.cc:396
#12 0x0805d65c in PDFCore::needTile (this=0x80e3660, page=0x8119118, x=0, y=0)
    at PDFCore.cc:835
#13 0x0805ffd7 in PDFCore::update (this=0x80e3660, topPageA=1, scrollXA=0, 
    scrollYA=0, zoomA=-1, rotateA=0, force=1, addToHist=1) at PDFCore.cc:658
#14 0x08064267 in XPDFCore::update (this=0x80e3660, topPageA=1, scrollXA=0, 
    scrollYA=0, zoomA=-1, rotateA=0, force=1, addToHist=1) at XPDFCore.cc:285
#15 0x0805b500 in PDFCore::displayPage (this=0x8154e60, topPageA=1, zoomA=-1, 
    rotateA=0, scrollToTop=1, addToHist=1) at PDFCore.cc:292
#16 0x0806fd20 in XPDFViewer (this=0x80c20c0, appA=0x8096650, 
    fileName=0x80c2098, pageA=1, destName=0x0, fullScreen=0, 
    ownerPassword=0x0, userPassword=0x0) at XPDFViewer.cc:297
#17 0x080618ce in XPDFApp::open (this=0x8096650, fileName=0x80c2098, page=1, 
    ownerPassword=0x0, userPassword=0x0) at XPDFApp.cc:228
#18 0x08072208 in main (argc=Cannot access memory at address 0x1
) at xpdf.cc:311
#19 0xb794c838 in __libc_start_main () from /lib/libc.so.6
#20 0x080518e1 in _start ()

This is fontconfig 2.4.2, compiled on Gentoo.
Comment 5 Albert Astals Cid 2007-11-22 12:43:01 UTC
works here on fontconfig 2.4.2 too, not gentoo though
Comment 6 Albert Astals Cid 2007-11-22 13:39:12 UTC
gentoo developer acknowledged it's a gentoo problem
Comment 7 Gerben Vos 2007-11-23 10:20:04 UTC
OK, can you provide the bug number on http://bugs.gentoo.org/ ? (Or privately bring me into contact with the gentoo developer you mention?)
Comment 8 Albert Astals Cid 2007-11-23 14:01:30 UTC
no, sorry i can not point you to gentoo bugtracker. gentoo developer nick is genstef
Comment 9 Gerben Vos 2007-11-28 06:25:09 UTC
For reference, the Gentoo bug for this is
http://bugs.gentoo.org/show_bug.cgi?id=199827 . It has been fixed in the most recent release.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.