<html>
<head>
<base href="http://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 --- - Bus error in ASTTemplateArgumentListInfo::initializeFrom"
href="http://llvm.org/bugs/show_bug.cgi?id=19278">19278</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Bus error in ASTTemplateArgumentListInfo::initializeFrom
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.4
</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>release blocker
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>hyrosen@mail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>File: llvm/tools/clang/lib/AST/TemplateBase.cpp
Config: LDFLAGS='-m32 -Wl,-R,/opt/swt/install/gcc-4.8.1/lib'
CXX=/opt/swt/install/gcc-4.8.1/bin/g++
CPP=/opt/swt/install/gcc-4.8.1/bin/cpp
CC=/opt/swt/install/gcc-4.8.1/bin/gcc
CXXFLAGS='-m32 -Wno-unused-local-typedefs -pthreads'
CFLAGS='-m32 -pthreads'
../llvm/configure
--enable-optimized
--prefix=.../install-sunos
--with-gcc-toolchain=/opt/swt/install/gcc-4.8.1
--enable-cxx11
--enable-bindings=none
Problem:
ASTTemplateArgumentListInfo::Create allocates memory for an
ASTTemplateArgumentListInfo object by calling ASTContext::Allocate with a
second parameter of llvm::alignOf<ASTTemplateArgumentListInfo>().
ASTTemplateArgumentListInfo objects are allocated with extra memory, such that
they are followed by a contiguous sequence of TemplateArgumentLoc objects. It
happens with this configuration that the alignment of
ASTTemplateArgumentListInfo is 4 while the alignment of TemplateArgumentLoc is
8, so misaligned memory is allocated resulting in a bus error when the
TemplateArgumentLoc are accessed.</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>