Skip to content

Commit

Permalink
Give ASAN some more stack
Browse files Browse the repository at this point in the history
When compiling CMAKE_BUILD_TYPE=Debug WITH_ASAN using clang-7 -O2
the following tests could fail due to insufficient stack size:
main.signal_demo3 sys_vars.max_sp_recursion_depth_func
  • Loading branch information
dr-m committed Mar 8, 2019
1 parent 136d21c commit 94eb56f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions include/my_pthread.h
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2014, Oracle and/or its affiliates.
Copyright (c) 2009, 2017, MariaDB Corporation.
Copyright (c) 2009, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -692,9 +692,9 @@ extern void my_mutex_end(void);
with the current number of keys and key parts.
*/
#ifdef __SANITIZE_ADDRESS__
#define DEFAULT_THREAD_STACK (364*1024L)
#define DEFAULT_THREAD_STACK (383*1024L) /* 392192 */
#else
#define DEFAULT_THREAD_STACK (292*1024L)
#define DEFAULT_THREAD_STACK (292*1024L) /* 299008 */
#endif
#endif

Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/mysqld--help.test
Expand Up @@ -57,7 +57,7 @@ perl;
# fixes for 32-bit
s/\b4294967295\b/18446744073709551615/;
s/\b2146435072\b/9223372036853727232/;
s/\b372736\b/299008/;
s/\b392192\b/299008/;
s/\b4294963200\b/18446744073709547520/;
foreach $var (@env) { s/\Q$ENV{$var}\E/$var/ }
next if /use --skip-(use-)?symbolic-links to disable/; # for valgrind, again
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/sys_vars/inc/sysvars_server.inc
Expand Up @@ -13,7 +13,7 @@ set sql_mode=ansi_quotes;
set global div_precision_increment=5;

--replace_regex /^\/\S+/PATH/
--replace_result $MASTER_MYPORT MASTER_MYPORT 372736 299008
--replace_result $MASTER_MYPORT MASTER_MYPORT 392192 299008
select * from information_schema.system_variables
where variable_name not like 'aria%' and
variable_name not like 'debug%' and
Expand Down
10 changes: 5 additions & 5 deletions mysql-test/suite/sys_vars/t/thread_stack_basic.test
@@ -1,17 +1,17 @@
#
# only global
#
--replace_result 372736 299008
--replace_result 392192 299008
select @@global.thread_stack;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.thread_stack;
--replace_result 372736 299008
--replace_result 392192 299008
show global variables like 'thread_stack';
--replace_result 372736 299008
--replace_result 392192 299008
show session variables like 'thread_stack';
--replace_result 372736 299008
--replace_result 392192 299008
select * from information_schema.global_variables where variable_name='thread_stack';
--replace_result 372736 299008
--replace_result 392192 299008
select * from information_schema.session_variables where variable_name='thread_stack';

#
Expand Down

0 comments on commit 94eb56f

Please sign in to comment.