Skip to content
/ server Public

Commit 37c1873

Browse files
committed
MDEV-38410 segfault inside std::function
Segfault inside the standard library… only memory corruption can explain it. I have uncertain suspictions.
1 parent ca0ca1a commit 37c1873

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

sql/rpl_info_file.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ struct Info_file
209209
*/
210210
struct Mem_fn: std::function<Persistent &(Info_file *self)>
211211
{
212-
using List= const std::initializer_list<Mem_fn>;
212+
using List= const std::initializer_list<const Mem_fn>;
213213
/// Null Constructor
214214
Mem_fn(std::nullptr_t null= nullptr):
215215
std::function<Persistent &(Info_file *)>(null) {}

sql/rpl_master_info_file.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,8 @@ struct Master_info_file: Info_file
587587
keys should match the corresponding old property name in @ref Master_info.
588588
*/
589589
// C++ default allocator to match that `mysql_execute_command()` uses `new`
590-
inline static const std::unordered_map<std::string_view, Mem_fn> VALUE_MAP= {
590+
inline static
591+
const std::unordered_map<std::string_view, const Mem_fn> VALUE_MAP= {
591592
/*
592593
These are here to annotate whether they are `DEFAULT`.
593594
They are repeated from @ref VALUE_LIST to enable bidirectional

0 commit comments

Comments
 (0)