Summary: | [pdfseparate] Segfault in XRef.cc:1609 | ||
---|---|---|---|
Product: | poppler | Reporter: | MH <ravdune+bugzilla> |
Component: | utils | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
segfault-XRef.cc:1609.pdf
fix crash |
Created attachment 108115 [details] [review] fix crash Not sure if this is the best fix. I can't reproduce the crash at all. Adrian can you? tsdgeos@inspiron:~/poppler$ valgrind ./build-new/utils/pdfseparate ~/pdf/attachment.cgi\?id\=108109 /dev/null ==9468== Memcheck, a memory error detector ==9468== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==9468== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info ==9468== Command: ./build-new/utils/pdfseparate /home/tsdgeos/pdf/attachment.cgi?id=108109 /dev/null ==9468== Syntax Error: Bad object number Syntax Error: Bad object number Syntax Error: Couldn't read xref table Syntax Error: Could not extract page(s) from damaged file ('/home/tsdgeos/pdf/attachment.cgi?id=108109') ==9468== ==9468== HEAP SUMMARY: ==9468== in use at exit: 34,125 bytes in 21 blocks ==9468== total heap usage: 5,365 allocs, 5,344 frees, 567,630 bytes allocated ==9468== ==9468== LEAK SUMMARY: ==9468== definitely lost: 96 bytes in 1 blocks ==9468== indirectly lost: 33,972 bytes in 11 blocks ==9468== possibly lost: 0 bytes in 0 blocks ==9468== still reachable: 57 bytes in 9 blocks ==9468== suppressed: 0 bytes in 0 blocks ==9468== Rerun with --leak-check=full to see details of leaked memory ==9468== ==9468== For counts of detected and suppressed errors, rerun with: -v ==9468== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) (In reply to Albert Astals Cid from comment #2) > I can't reproduce the crash at all. > > Adrian can you? Yes. I'm using gcc 4.9.1 on Debian testing. I can reproduce with either -O2 or -O0. Ha! i segfaults in 64bit but not in 32 bit :D Seems sane and fixes the crash so i've pushed it. |
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.
Created attachment 108109 [details] segfault-XRef.cc:1609.pdf OS: Fedora 20 (running in virtualbox) Dependencies installed with: yum-builddep poppler Version: GIT Master Command line: master/utils/pdfseparate <attached.pdf> /dev/null ############################################################################### GDB output: Reading symbols from /home/foobar/poppler/utils/.libs/lt-pdfseparate...done. Starting program: /home/foobar/poppler/utils/.libs/lt-pdfseparate segfault-xref.cc-1609-1-pdfseparatefuzz-12.pdf /dev/null Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7ac60a1 in XRef::getEntry (this=0x635ff0, i=2147483647, complainIfMissing=complainIfMissing@entry=true) at XRef.cc:1609 1609 if (entries[i].type == xrefEntryNone) {