mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-34388: Stack overflow on Alpine Linux
page_is_corrupted(): Do not allocate the buffers from stack, but from the heap, in xb_fil_cur_open(). row_quiesce_write_cfg(): Issue one type of message when we fail to create the .cfg file. update_statistics_for_table(), read_statistics_for_table(), delete_statistics_for_table(), rename_table_in_stat_tables(): Use a common stack buffer for Index_stat, Column_stat, Table_stat. ha_connect::FileExists(): Invoke push_warning_printf() so that we can avoid allocating a buffer for snprintf(). translog_init_with_table(): Do not duplicate TRANSLOG_PAGE_SIZE_BUFF. Let us also globally enable the GCC 4.4 and clang 3.0 option -Wframe-larger-than=16384 to reduce the possibility of introducing such stack overflow in the future. For RocksDB and Mroonga we relax these limits. Reviewed by: Vladislav Lesin
This commit is contained in:
@@ -83,13 +83,13 @@
|
||||
|
||||
/* Define pragmas to disable warnings for stack frame checking */
|
||||
|
||||
#if defined(__clang__)
|
||||
#ifdef __GNUC__
|
||||
#define PRAGMA_DISABLE_CHECK_STACK_FRAME \
|
||||
_Pragma("clang diagnostic push") \
|
||||
_Pragma("clang diagnostic ignored \"-Wframe-larger-than=\"")
|
||||
_Pragma("GCC diagnostic push") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wframe-larger-than=\"")
|
||||
|
||||
#define PRAGMA_REENABLE_CHECK_STACK_FRAME \
|
||||
_Pragma("clang diagnostic pop")
|
||||
_Pragma("GCC diagnostic pop")
|
||||
|
||||
#else
|
||||
#define PRAGMA_DISABLE_CHECK_STACK_FRAME
|
||||
|
Reference in New Issue
Block a user