Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
10.0.24
-
Ubuntu clang version 3.6.0-2ubuntu1~trusty1 with -Wdynamic-class-memaccess
-
10.1.14
Description
The clang -Wdynamic-class-memaccess warning is triggered when a Duplicate_weedout_picker's vtable is overwritten with memcpy or memset
mariadb-server/sql/sql_select.cc:24654:10: warning: destination for this 'memset' call is a pointer to class containing a dynamic class 'Duplicate_weedout_picker'; vtable pointer will be overwritten
|
[-Wdynamic-class-memaccess]
|
memset(best_positions, 0, sizeof(POSITION) * (table_count + 1));
|
mariadb-server/sql/sql_select.cc:24654:10: note: explicitly cast the pointer to silence this warning
|
memset(best_positions, 0, sizeof(POSITION) * (table_count + 1));
|
mariadb-server/sql/opt_subselect.cc:2246:21: warning: destination for this 'memcpy' call is a pointer to class containing a dynamic class 'Duplicate_weedout_picker'; vtable pointer will be overwritten
|
[-Wdynamic-class-memaccess]
|
memcpy(sjm->positions, join->best_positions + join->const_tables,
|
mariadb-server/sql/opt_subselect.cc:2246:21: note: explicitly cast the pointer to silence this warning
|
memcpy(sjm->positions, join->best_positions + join->const_tables,
|
mariadb-server/sql/opt_subselect.cc:3350:32: warning: destination for this 'memcpy' call is a pointer to class containing a dynamic class 'Duplicate_weedout_picker'; vtable pointer will be overwritten
|
[-Wdynamic-class-memaccess]
|
memcpy(pos - sjm->tables + 1, sjm->positions,
|
mariadb-server/sql/opt_subselect.cc:3350:32: note: explicitly cast the pointer to silence this warning
|
memcpy(pos - sjm->tables + 1, sjm->positions,
|
mariadb-server/sql/opt_subselect.cc:3366:35: warning: destination for this 'memcpy' call is a pointer to class containing a dynamic class 'Duplicate_weedout_picker'; vtable pointer will be overwritten
|
[-Wdynamic-class-memaccess]
|
memcpy(join->best_positions + first,
|
mariadb-server/sql/opt_subselect.cc:3366:35: note: explicitly cast the pointer to silence this warning
|
memcpy(join->best_positions + first,
|