<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 - Please backport r372038 to 9.0"
   href="https://bugs.llvm.org/show_bug.cgi?id=43736">43736</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Please backport r372038 to 9.0
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>compiler-rt
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>9.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>compiler-rt
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>mgorny@gentoo.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>caij2003@gmail.com, llvm-bugs@lists.llvm.org, phosek@chromium.org
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>43360
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The crtbegin/crtend files in 9.0.0 are broken, and cause -rtlib=compiler-rt to
create executables that crash immediately.  Please backport the fix listed
below.

@Jian Cai, @Petr, can you approve?

---

commit 155a43edb0c161bb5122ad4eeee991b43a0278bc
Author: Jian Cai <<a href="mailto:caij2003@gmail.com">caij2003@gmail.com</a>>
Date:   2019-09-16 23:47:47 +0200

    [compiler-rt][crt]  make test case nontrivial in check_cxx_section_exists

    Summary:
    .init_array gets optimized away when building with -O2 and as a result,
    check_cxx_section_exists failed to pass -DCOMPILER_RT_HAS_INITFINI_ARRAY
    when building crtbegin.o and crtend.o, which causes binaries linked with
    them encounter segmentation fault. See <a href="https://crbug.com/855759">https://crbug.com/855759</a> for
    details. This change prevents .init_array section to be optimized away
    even with -O2 or higher optimization level.

    Subscribers: dberris, mgorny, #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: <a href="https://reviews.llvm.org/D67628">https://reviews.llvm.org/D67628</a>

    llvm-svn: 372038</pre>
        </div>
      </p>

        <div id="referenced">
          <hr style="border: 1px dashed #969696">
          <b>Referenced Bugs:</b>
          <ul>
              <li>
                [<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [meta] 9.0.1 Release Blockers"
   href="https://bugs.llvm.org/show_bug.cgi?id=43360">Bug 43360</a>] [meta] 9.0.1 Release Blockers
              </li>
          </ul>
        </div>
        <br>

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

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