diff options
author | Kristian Nielsen <knielsen@knielsen-hq.org> | 2016-06-08 15:12:44 +0200 |
---|---|---|
committer | Kristian Nielsen <knielsen@knielsen-hq.org> | 2016-06-08 15:12:44 +0200 |
commit | 196d96cc8f19f1ecf337e6e4e933e1eef565f4aa (patch) | |
tree | ea3afef0d814aeba6aff304602b73ea652bc9204 /mysys/my_context.c | |
parent | 4f1ad43992d75676687f29da96dd7c4147247a8f (diff) | |
download | mariadb-git-196d96cc8f19f1ecf337e6e4e933e1eef565f4aa.tar.gz |
Fix compiler check for stack unwind hint
The check inserts a DWARF directive to tell stack unwinding that the
bottom of the (co-routine) stack has been reached. Without this, stack
traces may attempt to continue past the bottom of the stack.
The GCC version check was incorrect, and failed to trigger for GCC
version 5.[0123].
Diffstat (limited to 'mysys/my_context.c')
-rw-r--r-- | mysys/my_context.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mysys/my_context.c b/mysys/my_context.c index 80156df4495..01d6f404627 100644 --- a/mysys/my_context.c +++ b/mysys/my_context.c @@ -206,7 +206,7 @@ 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_MINOR__ >= 4 && !defined(__INTEL_COMPILER) +#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) && !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 @@ -456,7 +456,7 @@ my_context_spawn(struct my_context *c, void (*f)(void *), void *d) ( "movl %%esp, (%[save])\n\t" "movl %[stack], %%esp\n\t" -#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 4 && !defined(__INTEL_COMPILER) +#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) && !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 |