Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-830

[regression] zstd compression plugin exports zero symbols due to missing MARIADB_CLIENT_PLUGIN_EXPORT

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.4.9
    • 3.4.10
    • Plugin API
    • None

    Description

      MDEV-37527 (commit afb56859) added -fvisibility=hidden to all plugin builds and introduced the MARIADB_CLIENT_PLUGIN_EXPORT macro to explicitly export mysql_client_plugin_declaration from each plugin.

      plugins/compress/c_zstd.c was missed — every other plugin file was updated, but c_zstd.c still declares:

      MARIADB_COMPRESSION_PLUGIN mysql_client_plugin_declaration =

      instead of:

      MARIADB_CLIENT_PLUGIN_EXPORT MARIADB_COMPRESSION_PLUGIN mysql_client_plugin_declaration =

      With -fvisibility=hidden in effect, the symbol is hidden at compile time. The --dynamic-list linker flag cannot re-export it because the compiler has already marked it as local. Result: zstd.so exports zero symbols and cannot be loaded
      via dlsym().

      Verified against built Fedora 45 RPMs:

      • 3.4.8 zstd.so: exports mysql_client_plugin_declaration (plus 2 internal symbols)
      • 3.4.9 zstd.so: exports nothing — nm -D --defined-only returns empty

      The bug is still present on the 3.4 branch tip (3.4.10-dev, commit a98a068).

      Attachments

        Activity

          People

            wlad Vladislav Vaintroub
            mschorm Michal Schorm
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 20m
                20m

                Git Integration

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