[MDEV-20923] UBSAN: member access within address … which does not point to an object of type 'xid_count_per_binlog' Created: 2019-10-30 Updated: 2020-02-04 Resolved: 2020-01-29 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Affects Version/s: | 10.1, 10.2, 10.3, 10.4, 10.5 |
| Fix Version/s: | 10.1.45, 10.2.32, 10.3.23, 10.4.13 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Sujatha Sivakumar (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | undefined | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
For some reason, I am only seeing this reported for 10.4 and 10.5, not for earlier versions.
The top of the output looks like this:
For some reason, not all such access is flagged. Here is a sample around line 3694:
The problem appears to be that no constructor for xid_count_per_binlog is being called, and thus the vtable will not be initialized. It looks like there is no constructor at all provided for xid_count_per_binlog, even though it is a derived class:
A definition of MYSQL_BIN_LOG::xid_count_per_binlog::xid_count_per_binlog() is nowhere to be seen. Side note: starting with 10.4, we could use the standard C++11 way to omit default member functions:
Here is an attempted patch, which fails to compile due to missing constructor:
(Note: my_multi_malloc() would return entry_mem.) I do not know why I am not seeing any UBSAN errors reported for sql/log.cc in 10.2 or 10.3. It does not look like the code has changed. So, the affectedVersion and fixVersion may need to be revised. |
| Comments |
| Comment by Marko Mäkelä [ 2019-10-30 ] | |||||||
|
All of these are possibly related:
| |||||||
| Comment by Sujatha Sivakumar (Inactive) [ 2019-11-12 ] | |||||||
|
Hello Andrei, Can you please review the changes for Patch: https://github.com/MariaDB/server/commit/f72427f463d316a54ebf87c2e84c73947e3c5fe4 Build Bot testing: http://buildbot.askmonty.org/buildbot/grid?category=main&branch=bb-10.1-sujatha Thank you. | |||||||
| Comment by Andrei Elkin [ 2019-11-27 ] | |||||||
|
Sent my comments, cc-d to KN. | |||||||
| Comment by Marko Mäkelä [ 2020-01-23 ] | |||||||
|
The duplicate report | |||||||
| Comment by Sujatha Sivakumar (Inactive) [ 2020-01-29 ] | |||||||
|
Fix is implemented in 10.1.45. |