Conversation
midenok
force-pushed
the
10.11-midenok-MDEV-40854
branch
from
September 21, 2026 14:27
61f4663 to
dde3439
Compare
|
|
…gine
MemorySanitizer report:
==851408==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 ha_federated::end_bulk_insert() storage/federated/ha_federated.cc:2035:30
#1 mysql_insert(THD*, ...) sql/sql_insert.cc:1258:11
...
Memory was marked as uninitialized
#0 __msan_allocated_memory
#1 my_malloc mysys/my_malloc.c:116:7
SUMMARY: MemorySanitizer: use-of-uninitialized-value ... end_bulk_insert()
table_will_be_deleted is a handler member with no in-class
initializer, and the handler object itself is heap-allocated via
my_malloc(), so it starts out as garbage. It was only ever set in
extra(HA_EXTRA_PREPARE_FOR_DROP) and in external_lock(). For a
TEMPORARY table, statement execution can reach
end_bulk_insert()/write_row(), which reads the flag, without
external_lock() having run first, so the read sees uninitialized
memory.
The fix initializes table_will_be_deleted in reset(), which runs at
the start of every statement regardless of locking path.
midenok
force-pushed
the
10.11-midenok-MDEV-40854
branch
from
September 21, 2026 14:32
0631150 to
2738489
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MemorySanitizer report:
==851408==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 ha_federated::end_bulk_insert() storage/federated/ha_federated.cc:2035:30
#1 mysql_insert(THD*, ...) sql/sql_insert.cc:1258:11
...
Memory was marked as uninitialized
#0 __msan_allocated_memory
#1 my_malloc mysys/my_malloc.c:116:7
SUMMARY: MemorySanitizer: use-of-uninitialized-value ... end_bulk_insert()
table_will_be_deleted is a handler member with no in-class initializer, and the handler object itself is heap-allocated via my_malloc(), so it starts out as garbage. It was only ever set in extra(HA_EXTRA_PREPARE_FOR_DROP) and in external_lock(). For a TEMPORARY table, statement execution can reach
end_bulk_insert()/write_row(), which reads the flag, without external_lock() having run first, so the read sees uninitialized memory.
The fix initializes table_will_be_deleted in reset(), which runs at the start of every statement regardless of locking path.