[llvm-bugs] [Bug 26098] New: Flag unbalanced .cfi_adjust_cfa_offset directives at .cfi_endproc as error
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Jan 9 15:47:22 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=26098
Bug ID: 26098
Summary: Flag unbalanced .cfi_adjust_cfa_offset directives at
.cfi_endproc as error
Product: tools
Version: 3.5
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: enhancement
Priority: P
Component: gccas
Assignee: unassignedbugs at nondot.org
Reporter: bart.jacobs at cs.kuleuven.be
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 15597
--> https://llvm.org/bugs/attachment.cgi?id=15597&action=edit
Small repro
First: I'm not sure whether I am using gccas or llvm-as. The command I use is
'clang -arch x86_64 -c -v myobj.s'.
This is about .cfi_xxx directives for emitting DWARF CFI (call frame
information) that enables debuggers to generate stack backtraces and
programming language runtimes (specifically C++ and Objective-C) to walk and
unwind the stack.
The assembler currently accepts input where the net CFA offset adjustment at a
.cfi_endproc is nonzero. See small example attached. Its current behavior in
that case is that the adjustment is applied to the next assembly routine
(.cfi_startproc directive) as well. You can see by running 'dwarfdump
--eh-frame myobj.o'. I believe this input is usually/always erroneous and
furthermore the behavior is undesirable.
I would suggest to at least offer an option to have this flagged as an error.
Also, that behavior should probably be the default.
(Context: the OCaml native code compiler currently generates such unbalanced
directives. See http://caml.inria.fr/mantis/view.php?id=7120 and
http://caml.inria.fr/mantis/view.php?id=7118 and
https://github.com/ocaml/ocaml/pull/408 . In this case, it is definitely an
error. It caused my application to crash randomly. Especially during demos ;-)
)
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160109/66a34f66/attachment.html>
More information about the llvm-bugs
mailing list