mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixed BUG#9937: Crash on call to stored procedure.
This only showed up on two known platforms, both ia64 (one HP-UX and one Linux wich icc). For some reason, they only get half the stack size they are supposed to have, which makes deep SP recursion overrun the stack before check_stack_overrun() is triggered. Also made som minor fixes in the check_stack_overrun() definition, supporting variable margins. No test case added, but the reason for the bug report was a failed existing test case on these machines, which now works.
This commit is contained in:
@ -4985,11 +4985,11 @@ long max_stack_used;
|
||||
#endif
|
||||
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
bool check_stack_overrun(THD *thd,char *buf __attribute__((unused)))
|
||||
bool check_stack_overrun(THD *thd, long margin)
|
||||
{
|
||||
long stack_used;
|
||||
if ((stack_used=used_stack(thd->thread_stack,(char*) &stack_used)) >=
|
||||
(long) thread_stack_min)
|
||||
thread_stack - margin)
|
||||
{
|
||||
sprintf(errbuff[0],ER(ER_STACK_OVERRUN),stack_used,thread_stack);
|
||||
my_message(ER_STACK_OVERRUN,errbuff[0],MYF(0));
|
||||
|
Reference in New Issue
Block a user