<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - TypeLocBuilder::grow(size_t) must create an explicitly aligned buffer"
   href="https://llvm.org/bugs/show_bug.cgi?id=24615">24615</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>TypeLocBuilder::grow(size_t) must create an explicitly aligned buffer
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.6
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Sun
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Solaris
          </td>
        </tr>

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

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

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

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>stefan.teleman@oracle.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In TypeLocBuilder::grow(size_t)
(${top_srcdir}/tools/clang/lib/Sema/TypeLocBuilder.cpp)

the newly resized buffer is currently allocated with:

char *NewBuffer = new char[NewCapacity];

This does not guarantee that the resulting new buffer will be aligned
on the alignment boundary set in BufferMaxAlignment. But, we must ensure
that this resulting NewBuffer is indeed aligned on the boundary indicated
by BufferMaxAlignment.

I have a patch for this defect, and I will provide it here very shortly.

We have a number of clang and llvm patches for Solaris, and we have
every intention of contributing them to the project. This is just one
of several bugs with follow-up patches that I will be filing.</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>