Skip to content
Permalink
Browse files

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.
  • Loading branch information...
cvicentiu committed Mar 7, 2017
1 parent 6860a4b commit f65c9f825d164cf79dd6d5897ef144abba40ff6d
Showing with 2 additions and 1 deletion.
  1. +2 −1 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

0 comments on commit f65c9f8

Please sign in to comment.
You can’t perform that action at this time.