Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-33157

runtime error: call to function wsrep_plugin_init(void*) through pointer to incorrect function type

    XMLWordPrintable

Details

    Description

      Now that MDEV-26272 was finally fixed, I thought that I would give clang-16 a try with cmake -DWITH_UBSAN=ON. One of the many errors (a function pointer type mismatch) would be fixed by the following:

      diff --git a/sql/wsrep_plugin.cc b/sql/wsrep_plugin.cc
      index 743b8a593b8..3fa5f7b7ef4 100644
      --- a/sql/wsrep_plugin.cc
      +++ b/sql/wsrep_plugin.cc
      @@ -18,18 +18,6 @@
       
       #include <mysql/plugin.h>
       
      -static int wsrep_plugin_init(void *p)
      -{
      -  WSREP_DEBUG("wsrep_plugin_init()");
      -  return 0;
      -}
      -
      -static int wsrep_plugin_deinit(void *p)
      -{
      -  WSREP_DEBUG("wsrep_plugin_deinit()");
      -  return 0;
      -}
      -
       struct Mysql_replication wsrep_plugin= {
         MYSQL_REPLICATION_INTERFACE_VERSION
       };
      @@ -42,8 +30,8 @@ maria_declare_plugin(wsrep)
         "Codership Oy",
         "Wsrep replication plugin",
         PLUGIN_LICENSE_GPL,
      -  wsrep_plugin_init,
      -  wsrep_plugin_deinit,
      +  NULL,
      +  NULL,
         0x0100,
         NULL, /* Status variables */
         NULL, /* System variables */
      

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.