[compiler-rt] r192196 - [sanitizer] Do not break the CFI unwind chain in clone().
Sergey Matveev
earthdok at google.com
Tue Oct 8 09:38:39 PDT 2013
Author: smatveev
Date: Tue Oct 8 11:38:39 2013
New Revision: 192196
URL: http://llvm.org/viewvc/llvm-project?rev=192196&view=rev
Log:
[sanitizer] Do not break the CFI unwind chain in clone().
Fixes build on clang 3.2, which doesn't support cfi_undefined. This change
doesn't seem to break the slow unwinder. Even if it does, the worst thing that
could happen is that we would not see a backtrace when a fatal error happens
under StopTheWorld.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=192196&r1=192195&r2=192196&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Tue Oct 8 11:38:39 2013
@@ -787,7 +787,6 @@ uptr internal_clone(int (*fn)(void *), v
*/
"movq %6,%%r8\n"
"movq %7,%%r10\n"
- ".cfi_endproc\n"
"syscall\n"
/* if (%rax != 0)
@@ -797,8 +796,9 @@ uptr internal_clone(int (*fn)(void *), v
"jnz 1f\n"
/* In the child. Terminate unwind chain. */
- ".cfi_startproc\n"
- ".cfi_undefined %%rip;\n"
+ // XXX: We should also terminate the CFI unwind chain
+ // here. Unfortunately clang 3.2 doesn't support the
+ // necessary CFI directives, so we skip that part.
"xorq %%rbp,%%rbp\n"
/* Call "fn(arg)". */
More information about the llvm-commits
mailing list