<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - poppler-master (4c7814): abort on invalid XRef"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=104517">104517</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>poppler-master (4c7814): abort on invalid XRef
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>poppler
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>general
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>poppler-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>legarrec.vincent@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=136586" name="attach_136586" title="abort_on_dead_object.pdf">attachment 136586</a> <a href="attachment.cgi?id=136586&action=edit" title="abort_on_dead_object.pdf">[details]</a></span>
abort_on_dead_object.pdf

Console output:
Syntax Warning: May not be a PDF file (continuing anyway)
Syntax Error: Dictionary key must be a name object
Syntax Error: End of file inside dictionary
Syntax Warning: No valid XRef size in trailer
Internal Error (0): Call to dead object

Backtrack:
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff719ccaf in __GI_abort () at abort.c:90
#2  0x00007ffff7abc602 in Object::isNull (this=<optimized out>)
    at /home/legarrec/info/programmation/poppler/poppler/Object.h:196
#3  XRef::fetch (this=this@entry=0x5555557b1d70, num=1, gen=0, 
    recursion=recursion@entry=0)
    at /home/legarrec/info/programmation/poppler/poppler/XRef.cc:1126
#4  0x00007ffff7abd19c in XRef::getCatalog (this=0x5555557b1d70)
    at /home/legarrec/info/programmation/poppler/poppler/XRef.cc:1103
#5  0x00007ffff7a25b45 in Catalog::Catalog (this=0x5555557b2160, 
    docA=0x5555557b16c0)
    at /home/legarrec/info/programmation/poppler/poppler/Catalog.cc:106
#6  0x00007ffff7aa2da8 in PDFDoc::setup (this=this@entry=0x5555557b16c0, 
    ownerPassword=ownerPassword@entry=0x0, userPassword=userPassword@entry=0x0)
    at /home/legarrec/info/programmation/poppler/poppler/PDFDoc.cc:293
#7  0x00007ffff7aa2f3c in PDFDoc::PDFDoc (this=0x5555557b16c0, 
    fileNameA=<optimized out>, ownerPassword=0x0, userPassword=0x0, 
    guiDataA=<optimized out>)
    at /home/legarrec/info/programmation/poppler/poppler/PDFDoc.cc:179
#8  0x00007ffff7a98195 in LocalPDFDocBuilder::buildPDFDoc (
    this=<optimized out>, uri=..., ownerPassword=0x0, userPassword=0x0, 
    guiDataA=0x0)
    at
/home/legarrec/info/programmation/poppler/poppler/LocalPDFDocBuilder.cc:31
#9  0x000055555555e505 in main (argc=<optimized out>, argv=0x7fffffffd818)
    at /home/legarrec/info/programmation/poppler/utils/pdftohtml.cc:249

Doesn't crash in poppler-0.57.
I bisect: commit 3c29ded4bee5eadb829ed46af2ec92be57b0077b

Make Object free itself on init and destruction
Will make for a *much* easier way to code.

Patches with more std::move coming on top.

Most things seem to work though i'm pretty sure some things are broken.

NEEDS TESTING</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>