[MDEV-21167] LF_PINS::stack_ends_here can be inaccurate, leading to alloca() larger than stack Created: 2019-11-28  Updated: 2020-08-25  Resolved: 2019-11-28

Status: Closed
Project: MariaDB Server
Component/s: Server, Storage Engine - InnoDB
Affects Version/s: None
Fix Version/s: 10.3.21

Type: Bug Priority: Major
Reporter: Vladislav Vaintroub Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: None


 Description   

lf_pinbox_real_free() tries to allocate some stack to sort the pins, and is using
LF_PINS::stack_ends_here to do that.

There is a problem with it however, because LF_PINS::stack_ends_here is from the stack where
pins were allocated, and this is not necessarily the current thread.
E.g binlog group commit in Innodb commits multiple transactions that come from multiple THDs in a single function, trx_commit_in_memory/deregister_rw would use LF_PINS allocated
in another thread.


Generated at Thu Feb 08 09:05:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.