<html>
    <head>
      <base href="https://bugs.llvm.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 - [ThinLTO] Incautious error handling"
   href="https://bugs.llvm.org/show_bug.cgi?id=35552">35552</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[ThinLTO] Incautious error handling
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Bitcode Reader
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>paul_robinson@playstation.sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>While investigating PR35472, we occasionally got a different error,
"can't create module summary index for buffer: Invalid bitcode signature"
followed by a crash.

ThinLTOCodeGenerator::linkCombinedIndex() nominally returns a
std::unique_ptr<ModuleSummaryIndex>, however if readModuleSummaryIndex()
returns an error (e.g., Invalid bitcode signature), linkCombinedIndex() 
can return nullptr.

ThinLTOCodeGenerator::run() has this code:

  // Sequential linking phase
  auto Index = linkCombinedIndex();
  ...
  Index->collectDefinedGVSummariesPerModule(ModuleToDefinedGVSummaries);

That is, there's no null check, and the nullptr causes the inevitable
segfault.  I figured I'd let the ThinLTO experts decide how they want
to handle this.</pre>
        </div>
      </p>


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

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>