<html>
<head>
<base href="https://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 --- - Info from .cfi directives should by default go into .debug_frame, not .eh_frame section"
href="https://llvm.org/bugs/show_bug.cgi?id=26191">26191</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Info from .cfi directives should by default go into .debug_frame, not .eh_frame section
</td>
</tr>
<tr>
<th>Product</th>
<td>tools
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>llvm-as
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>bart.jacobs@cs.kuleuven.be
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>It seems that the LLVM assembler currently, at least on OS X, always emits the
call frame information/stack unwinding information specified by the .cfi_xxx
directives into the .eh_frame section instead of the .debug_frame section.
I would argue that this is unsafe behavior. The user may only have the
debugging scenario in mind, not the run-time stack unwinding scenario. By
emitting the unwinding info into .eh_frame, the assembler causes the platform's
unwinder to walk the program's stack at run time (if the program calls into
Cocoa or some other Objective-C library, for example), possibly causing the
program to crash if the unwind info specified in the .cfi directives is
incorrect. (This has been causing my application to crash; see
<a href="http://caml.inria.fr/mantis/view.php?id=7118">http://caml.inria.fr/mantis/view.php?id=7118</a> .) The user may not be aware of
this source of instability, and may therefore be less careful about getting the
.cfi directives right.
As a general principle, I would propose that participating in the run-time
stack unwinding story should be an opt-in, not a default, due to the stability
risks involved.</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>