<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:mclow.lists@gmail.com" title="Marshall Clow (home) <mclow.lists@gmail.com>"> <span class="fn">Marshall Clow (home)</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Abort trap: 6 libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc"
href="https://llvm.org/bugs/show_bug.cgi?id=28453">bug 28453</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;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>INVALID
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Abort trap: 6 libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc"
href="https://llvm.org/bugs/show_bug.cgi?id=28453#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Abort trap: 6 libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc"
href="https://llvm.org/bugs/show_bug.cgi?id=28453">bug 28453</a>
from <span class="vcard"><a class="email" href="mailto:mclow.lists@gmail.com" title="Marshall Clow (home) <mclow.lists@gmail.com>"> <span class="fn">Marshall Clow (home)</span></a>
</span></b>
<pre>Your comparison function (compareStr) does not impose a strict weak ordering on
the strings. Hence the behavior of sort is undefined.
A reasonable discussion can be found here:
<a href="https://www.securecoding.cert.org/confluence/display/cplusplus/CTR57-CPP.+Provide+a+valid+ordering+predicate">https://www.securecoding.cert.org/confluence/display/cplusplus/CTR57-CPP.+Provide+a+valid+ordering+predicate</a>
but your fails two simple tests.
comp(a, a) --> false
comp(a, b) != comp(b, a)</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>