Skip to content

Commit cf1c381

Browse files
grooverdanLinuxJedi
authored andcommitted
MDEV-34099: AddressSanitizer running out of memory regardless of stack_thread size
Address Sanitizer's know how to detect stack overrun, so there's no point in us doing it. As evidenced by perfschema tests where signficant test failures because this function failed under ASAN (MDEV-33210). Also, so since clang-16, we cannot assume much about how local variables are allocated on the stack (MDEV-31605). Disabling check idea thanks to Sanja.
1 parent 405613e commit cf1c381

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sql/sql_parse.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7614,6 +7614,7 @@ __attribute__((optimize("-O0")))
76147614
#endif
76157615
check_stack_overrun(THD *thd, long margin, uchar *buf __attribute__((unused)))
76167616
{
7617+
#ifndef __SANITIZE_ADDRESS__
76177618
long stack_used;
76187619
DBUG_ASSERT(thd == current_thd);
76197620
if ((stack_used= available_stack_size(thd->thread_stack, &stack_used)) >=
@@ -7636,6 +7637,7 @@ check_stack_overrun(THD *thd, long margin, uchar *buf __attribute__((unused)))
76367637
#ifndef DBUG_OFF
76377638
max_stack_used= MY_MAX(max_stack_used, stack_used);
76387639
#endif
7640+
#endif /* __SANITIZE_ADDRESS__ */
76397641
return 0;
76407642
}
76417643

0 commit comments

Comments
 (0)