<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:efriedma@codeaurora.org" title="Eli Friedman <efriedma@codeaurora.org>"> <span class="fn">Eli Friedman</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Test using strcmp fails after r339410"
href="https://bugs.llvm.org/show_bug.cgi?id=38657">bug 38657</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>INVALID
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>REOPENED
</td>
<td>RESOLVED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Test using strcmp fails after r339410"
href="https://bugs.llvm.org/show_bug.cgi?id=38657#c8">Comment # 8</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Test using strcmp fails after r339410"
href="https://bugs.llvm.org/show_bug.cgi?id=38657">bug 38657</a>
from <span class="vcard"><a class="email" href="mailto:efriedma@codeaurora.org" title="Eli Friedman <efriedma@codeaurora.org>"> <span class="fn">Eli Friedman</span></a>
</span></b>
<pre>Yes, still a use-after-free. There are a few easy ways to verify this. One, it
crashes if you change "struct String" to allocate storage on the heap, e.g.:
struct String {
char *content;
String (const String& a) {
content = new char[1000000];
strcpy(content, a.content);
}
String (const char* a) {
content = new char[1000000];
strcpy(content, a);
}
operator const char* () const {
return content;
}
~String() { delete content; }
};
Two, if you build with -fsanitize=address, you'll get a "stack-use-after-scope"
error.</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>