<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - C++ std::exception is NULL when compiled as ObjC++, but C++ is OK"
href="https://bugs.llvm.org/show_bug.cgi?id=34556">34556</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>C++ std::exception is NULL when compiled as ObjC++, but C++ is OK
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>5.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dlobron@akamai.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=19133" name="attach_19133" title="Minimal reproducing program, with .cc suffix">attachment 19133</a> <a href="attachment.cgi?id=19133&action=edit" title="Minimal reproducing program, with .cc suffix">[details]</a></span>
Minimal reproducing program, with .cc suffix
I'm observing failures on GNU/Linux (3.13.0-113-generic #160-Ubuntu SMP) when I
compile with clang/llvm-5.0.0 (the latest svn tree, checked out and built from
scratch on Sept 08, 2017), with libobjc2 as the Objective-C runtime. The
proximate cause of the crashes is a NULL std::exception object. This is
evident when I examine the stack from my minimal reproducer in gdb:
exceptionObject = 0x0
A more complicated program, which uses a custom C++ exception class derived
from std::exception, also shows this symptom (here, the variable "e" is of the
derived exception type):
e = @0x0: <error reading variable>
I've attached a minimal reproducing program, which is entirely C++. The crash
only occurs when compile as a .mm (Objective-C++) program. When I compiled as
C++ (.cc), the problem goes away.</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>