From f65c9f825d164cf79dd6d5897ef144abba40ff6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= Date: Tue, 7 Mar 2017 15:52:17 +0200 Subject: [PATCH] mysql_client_test_nonblock fails when compiled with clang mysql_client uses some inline assembly code to switch thread stacks. This works, however tools that perform backtrace get confused to fix this we write a specific constant to signify bottom of stack. This constant is needed when compiling with CLang as well. --- mysys/my_context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mysys/my_context.c b/mysys/my_context.c index 5ddb2ccd566..6960b0c6c5a 100644 --- a/mysys/my_context.c +++ b/mysys/my_context.c @@ -206,7 +206,8 @@ my_context_spawn(struct my_context *c, void (*f)(void *), void *d) ( "movq %%rsp, (%[save])\n\t" "movq %[stack], %%rsp\n\t" -#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) && !defined(__INTEL_COMPILER) +#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) || __clang__) && \ + !defined(__INTEL_COMPILER) /* This emits a DWARF DW_CFA_undefined directive to make the return address undefined. This indicates that this is the top of the stack frame, and