Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug#24343330: READ OF OUT-OF-SCOPE (TEMPFILE) IN MYSQL_UPDATE()
The problem was that an IO_CACHE variable used during UPDATE, was allocated on the stack and later copyied into a heap allocated variable. However, the pointers inside this struct was not adjusted, so that they still pointed to the stack. After the stack frame ended, they became invalid. This patch fixes the problem by allocating the IO_CACHE on the heap instead and copying the pointer to this IO_CACHE struct, rather than copying the contents of the struct. Issue identified by the new ASAN option -fsanitize-address-use-after-scope (cherry picked from commit d3bff0c03637119f960c7d3db67a85912bc37e4a)
- Loading branch information
Showing
1 changed file
with
15 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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