Possible Segfault Indicated During Compilation

XMLWordPrintable

    • Type: Incident report
    • Resolution: Duplicate
    • Priority: Trivial
    • None
    • Affects Version/s: 7.4.8, 7.4.9
    • Component/s: None
    • None

      Steps to reproduce:

      1. Compile Zabbix from source
      2. See potential logic error:

       

      mv -f .deps/libzbxdbwrap_a-trigger_linking.Tpo .deps/libzbxdbwrap_a-trigger_linking.Po
      In file included from ../../../include/zbxdbhigh.h:18,
                       from template_item.c:15:
      In function 'zbx_vector_template_item_ptr_append_array',
          inlined from 'zbx_vector_template_item_ptr_append_array' at template_item.c:125:1,
          inlined from 'link_template_dependent_items' at template_item.c:2636:2,
          inlined from 'DBcopy_template_items' at template_item.c:3324:2:
      ../../../include/abxalgo.h:471:9: warning: 'memcpy' specified bound between 18446744056529682432 and 18446744073709551608 exceeds maximum object size 9223372036854775807 [-Wstrinop-overflow=]
        471 |      memcpy(vector->values + vector->values_num, values, (size_t)values_num * sizeof(__type));
            |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ../../../include/abxalgo.h::653:1: note: in expansion of macro 'ZBX_VECTOR_FUNC_IMPL'
        653 | ZBX_VECTOR_FUNC_IMPL(__id, __type, const)
            | ^~~~~~~~~~~~~~~~~~~~
      template_item.c:125:1: note: in expansion of macro 'ZBX_PTR_VECTOR_IMPL'
        125 | ZBX_PTR_VECTOR_IMPL(template_item_ptr, zbx_template_item_t*)
            | ^~~~~~~~~~~~~~~~~~~
      mv -f .deps/libzbxdbwrap_a-template_item.Tpo .deps/libzbxdbwrap_a-template_item.Po
      
      

      This has been confirmed when trying to compile 7.4.8 and 7.4.9. I'm going to keep working back through versions to help identify when this was introduced. My compilation code basically does this:

      ./bootstrap.sh
      export CFLAGS="${CFLAGS} --std=gnu99"
      ./configure <OPTIONS_HERE>
      make
      make dbschema 

       

            Assignee:
            Zabbix Support Team
            Reporter:
            Ryan Eberly
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: