Skip to content

Compiler error with M-BUFFER on newer Fedora and GCC #153

@BrianSipos

Description

@BrianSipos

When building source on Fedora 43 (and 44) which has been working well on RHEL-9 for some time I get GCC compiler errors about possible overflow. It seems like this may just be an issue with how the newer compiler checks valid behavior because I've run this through valgrind and other tools without any problems found.

There are full build logs available from Fedora COPR but the pertinent lines are below:

.../agent.h:69:1: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
   69 | M_BUFFER_DEF(MockBPA_data_queue, mock_bpa_ctr_t, MOCKBPA_DATA_QUEUE_SIZE,
      | ^~~~~~~~~~~~
.../agent.h:69:1: note: at offset 80 into destination object ‘mutexPush’ of size 40
   69 | M_BUFFER_DEF(MockBPA_data_queue, mock_bpa_ctr_t, MOCKBPA_DATA_QUEUE_SIZE,
      | ^~~~~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions