Commit 937ae82a authored by Sergei Golubchik's avatar Sergei Golubchik

fix async client code for i386 (assembly)

and when safemalloc is enabled (use ucontext, otherwise backtrace function gets confused and crashes)
parent 2d7c39e0
......@@ -29,7 +29,7 @@
#define MY_CONTEXT_USE_WIN32_FIBERS 1
#elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__x86_64__)
#define MY_CONTEXT_USE_X86_64_GCC_ASM
#elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__i386__)
#elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__i386__) && !defined(SAFEMALLOC)
#define MY_CONTEXT_USE_I386_GCC_ASM
#else
#define MY_CONTEXT_USE_UCONTEXT
......
......@@ -487,9 +487,9 @@ my_context_spawn(struct my_context *c, void (*f)(void *), void *d)
: [stack] "a" (c->stack_top),
/* Need this in callee-save register to preserve across function call. */
[save] "D" (&c->save[0]),
[f] "m" (f),
[d] "m" (d)
: "ecx", "edx", "memory", "cc"
[f] "c" (f),
[d] "d" (d)
: "memory", "cc"
);
DBUG_SWAP_CODE_STATE(&c->dbug_state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment