forked from OSchip/llvm-project
[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. llvm-svn: 192196
This commit is contained in:
parent
ea9d124fd4
commit
398fb700a2
|
@ -787,7 +787,6 @@ uptr internal_clone(int (*fn)(void *), void *child_stack, int flags, void *arg,
|
|||
*/
|
||||
"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 *), void *child_stack, int flags, void *arg,
|
|||
"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)". */
|
||||
|
|
Loading…
Reference in New Issue