Browse Source
MDEV-21341: Fix UBSAN failures: Issue Six
MDEV-21341: Fix UBSAN failures: Issue Six
(Variant #2 of the patch, which keeps the sp_head object inside the MEM_ROOT that sp_head object owns) (10.3 requires extra work due to sp_package, will commit a separate patch for it) sp_head::operator new() and operator delete() were dereferencing sp_head* pointers to memory that didn't hold a valid sp_head object (it was not created/already destroyed). This caused UBSan to crash when looking up type information. Fixed by providing static sp_head::create() and sp_head::destroy() methods.pull/1452/head
10 changed files with 47 additions and 54 deletions
-
2sql/sp.cc
-
2sql/sp_cache.cc
-
62sql/sp_head.cc
-
17sql/sp_head.h
-
4sql/sql_lex.cc
-
2sql/sql_parse.cc
-
2sql/sql_prepare.cc
-
6sql/sql_show.cc
-
2sql/sql_trigger.cc
-
2sql/sql_yacc.yy
Write
Preview
Loading…
Cancel
Save
Reference in new issue