<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 --- - imprecise debug info for class initializer list (hurting asan reports)"
href="http://llvm.org/bugs/show_bug.cgi?id=21737">21737</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>imprecise debug info for class initializer list (hurting asan reports)
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>normal
</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>kcc@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dblaikie@gmail.com, dgregor@apple.com, llvmbugs@cs.uiuc.edu, vonosmas@gmail.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>When we have a long initializer list the debug info seems to point to the
opening "{" instead of the actual code in the initializer list.
I frequently hit this when analyzing asan/msan/tsan reports.
E.g. this:
% cat init-list.cc
struct Foo {
Foo(int *p)
: a(p[0])
, b(p[1])
, c(p[2])
, d(p[3])
, e(p[4])
, f(p[5])
, g(p[6])
, h(p[7])
{}
int a, b, c, d, e, f, g, h;
};
int x[SIZE];
int main() {
Foo foo(x);
}
% clang -g -DSIZE=3 -fsanitize=address init-list.cc && ./a.out
=================================================================
==20464==ERROR: AddressSanitizer: global-buffer-overflow on address ...
#0 0x499c91 in Foo::Foo(int*) init-list.cc:11:3
No matter what SIZE is, i.e. where the bug happens, asan will point to "{}"</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>