From 94eb56fb29334a1075103becb625685b23f7d437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 8 Mar 2019 10:21:58 +0200 Subject: [PATCH] Give ASAN some more stack 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 --- include/my_pthread.h | 6 +++--- mysql-test/main/mysqld--help.test | 2 +- mysql-test/suite/sys_vars/inc/sysvars_server.inc | 2 +- mysql-test/suite/sys_vars/t/thread_stack_basic.test | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/my_pthread.h b/include/my_pthread.h index 302d4e95cea..264125a8fe3 100644 --- a/include/my_pthread.h +++ b/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 @@ -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 diff --git a/mysql-test/main/mysqld--help.test b/mysql-test/main/mysqld--help.test index 68ee2f087ab..c2b6424599a 100644 --- a/mysql-test/main/mysqld--help.test +++ b/mysql-test/main/mysqld--help.test @@ -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 diff --git a/mysql-test/suite/sys_vars/inc/sysvars_server.inc b/mysql-test/suite/sys_vars/inc/sysvars_server.inc index 1e504837587..af1b0ce4563 100644 --- a/mysql-test/suite/sys_vars/inc/sysvars_server.inc +++ b/mysql-test/suite/sys_vars/inc/sysvars_server.inc @@ -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 diff --git a/mysql-test/suite/sys_vars/t/thread_stack_basic.test b/mysql-test/suite/sys_vars/t/thread_stack_basic.test index bfd3fb40db3..41015033fe9 100644 --- a/mysql-test/suite/sys_vars/t/thread_stack_basic.test +++ b/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'; #