[llvm-bugs] [Bug 24615] New: TypeLocBuilder::grow(size_t) must create an explicitly aligned buffer

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 28 08:24:12 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24615

            Bug ID: 24615
           Summary: TypeLocBuilder::grow(size_t) must create an explicitly
                    aligned buffer
           Product: clang
           Version: 3.6
          Hardware: Sun
                OS: Solaris
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: stefan.teleman at oracle.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150828/74340cb6/attachment.html>


More information about the llvm-bugs mailing list