Details
-
Bug
-
Status: Done
-
Medium
-
Resolution: Fixed
-
5.7.34-37 (Q2 2021), 8.0.25-15 (Q2 2021)
-
None
-
None
Description
Found this issue while merging PS-5.7.34 to PXC.
There is a chance that we may call `free_share()` twice in this code https://github.com/percona/percona-server/blob/release-5.7.34-37/storage/innobase/handler/ha_innodb.cc#L7059-L7068
The first call came as part of the https://github.com/percona/percona-server/commit/55f8e5ea08 and the second call existed in PS from a long time.
Even though `free_share()` internally uses reference counting, calling it twice is not desirable and may cause undefined behavior. This needs to be investigated.