<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:lebedev.ri@gmail.com" title="Roman Lebedev <lebedev.ri@gmail.com>"> <span class="fn">Roman Lebedev</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Signed integer overflow causes program to skip the epilogue and fall into another function"
href="https://bugs.llvm.org/show_bug.cgi?id=49599">bug 49599</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>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>lebedev.ri@gmail.com
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Signed integer overflow causes program to skip the epilogue and fall into another function"
href="https://bugs.llvm.org/show_bug.cgi?id=49599#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Signed integer overflow causes program to skip the epilogue and fall into another function"
href="https://bugs.llvm.org/show_bug.cgi?id=49599">bug 49599</a>
from <span class="vcard"><a class="email" href="mailto:lebedev.ri@gmail.com" title="Roman Lebedev <lebedev.ri@gmail.com>"> <span class="fn">Roman Lebedev</span></a>
</span></b>
<pre>This is indeed UB, and -fsanitize=undefined will tell you about it:
<a href="https://godbolt.org/z/79q6s8">https://godbolt.org/z/79q6s8</a>
example.cpp:4:29: runtime error: signed integer overflow: 2147483647 + 1 cannot
be represented in type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior example.cpp:4:29 in
You probably want -fwrapv.</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>