From 41b2c8f743e90fee2c6951e5bc68bd19f7dafeb5 Mon Sep 17 00:00:00 2001 From: kjarir Date: Sat, 9 May 2026 19:46:25 +0530 Subject: [PATCH] MDEV-37664: Fix main.lotofstack failure under UBSAN The test called bug10100p(255) expecting ER_STACK_OVERRUN_NEED_MORE, but under UBSAN inflated per-frame stack usage causes the recursion limit to be hit before the stack guard fires. The max_sp_recursion_depth was not possible to extend beyond 255 which would have enabled a compatible test. The alternate considered was allowing an alternative error ER_SP_RECURSION_LIMIT, however there is already sufficient tests on this. To gain a positive test result for MTR in the UBSAN environment we've just disabled the test there. Reviewers: Joro Kodinov, Sergey Vojtovich, Daniel Black --- mysql-test/main/lotofstack.test | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mysql-test/main/lotofstack.test b/mysql-test/main/lotofstack.test index a658fb00e9ff9..9effbc2aebef3 100644 --- a/mysql-test/main/lotofstack.test +++ b/mysql-test/main/lotofstack.test @@ -1,8 +1,13 @@ # -# For tests that need a lot of stack - they likely won't work under ASAN +# For tests that need a lot of stack +# +# Both ASAN and UBSAN have extended stacks sizes +# making writing tests that depend on reaching +# the depth hard. # source include/not_asan.inc; source include/not_embedded.inc; +source include/not_ubsan.inc; # # Bug#10100 function (and stored procedure?) recursivity problem