mirror of
https://github.com/MariaDB/server.git
synced 2026-05-17 20:37:12 +02: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:
parent
2350295643
commit
82d7419e06
21 changed files with 130 additions and 119 deletions
7
storage/mroonga/vendor/groonga/lib/expr.c
vendored
7
storage/mroonga/vendor/groonga/lib/expr.c
vendored
|
|
@ -2459,6 +2459,10 @@ grn_proc_call(grn_ctx *ctx, grn_obj *proc, int nargs, grn_obj *caller)
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
#ifdef __GNUC__
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wframe-larger-than="
|
||||
#endif
|
||||
inline static void
|
||||
grn_expr_exec_get_member_vector(grn_ctx *ctx,
|
||||
grn_obj *expr,
|
||||
|
|
@ -3834,6 +3838,9 @@ exit :
|
|||
}
|
||||
GRN_API_RETURN(val);
|
||||
}
|
||||
#ifdef __GNUC__
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
grn_obj *
|
||||
grn_expr_get_value(grn_ctx *ctx, grn_obj *expr, int offset)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue