On 1/19/11 3:10 PM, Dmitry Shulga wrote:
> #At file:///Users/shulga/projects/mysql/5.1-bugteam-bug58026/ based on
> 3514 Dmitry Shulga 2011-01-19
> Fixed bug#58026 - massive recursion and crash in regular expression
> The problem was that parsing of nested regular expression involved
> recursive calls. Such recursion didn't take into account the amount of
> available stack space, which ended up leading to stack overflow crashes.
> === modified file 'sql/mysqld.cc'
> --- a/sql/mysqld.cc 2010-11-09 14:45:13 +0000
> +++ b/sql/mysqld.cc 2011-01-19 17:10:47 +0000
> @@ -3032,6 +3032,20 @@ sizeof(load_default_groups)/sizeof(load_
> +#ifndef EMBEDDED_LIBRARY
> +extern "C"
> + uchar stack_top;
> + return check_stack_overrun(current_thd, STACK_MIN_SIZE,
> + return 0;
Two return values. Also, this makes the function global, while what I
sent makes the function specific to this compilation unit.