Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-23672

Changes for binary items break module compatibility

    XMLWordPrintable

Details

    • Team C
    • Sprint 106 (Nov 2023)
    • 0.2

    Description

      From cyclone in ZBXNEXT-8211:

      I would like to draw attention to loadable module binary compatibility issue introduced with this feature.

      The problem is very similar to ZBX-10428. A new field char bin was introduced in AGENT_RESULT structure. As a result an offset of int type field has changed and it made SET_RESULT()/ZBX_ISSET*() macros in different versions of Zabbix incompatible with each other. At the same time ZBX_MODULE_API_VERSION remained unchanged.

      Fortunately, unlike ZBX-10428, the issue was caught before the major release and you still have an opportunity to restore compatibility or bump API version before the release.

      Of course, module authors would appreciate restoring compatibility. For AGENT_RESULT it can be easily achieved by moving new char *bin field to the end of struct, hence the offset of int type will not be affected. Also ZBX_HISTORY_WRITE_CBS needs to be restored to its original shape. If needed, new history_bin_cb field can be introduced in a whole new ZBX_HISTORY_WRITE_CBS_v2 returned by whole new zbx_module_history_write_cbs_v2().

      Attachments

        Activity

          People

            arimdjonoks Artjoms Rimdjonoks
            Kalimulin Alex Kalimulin
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: