Skip to content

warning: ‘fmpz_mod_mat_mul’ accessing 40 bytes in a region of size 32 #187

@GiacomoPope

Description

@GiacomoPope

Noticed in the CI that there's something wrong about the mat_mul operations (https://github.com/flintlib/python-flint/actions/runs/10402835971/job/28808112409?pr=182)

For example

 In function ‘__pyx_pf_5flint_5types_12fmpz_mod_mat_12fmpz_mod_mat_36_pow’,
    inlined from ‘__pyx_pw_5flint_5types_12fmpz_mod_mat_12fmpz_mod_mat_37_pow’ at src/flint/types/fmpz_mod_mat.c:11474:13:
src/flint/types/fmpz_mod_mat.c:1330:51: warning: ‘fmpz_mod_mat_mul’ accessing 40 bytes in a region of size 32 [-Wstringop-overflow=]
 1330 |     #define compat_fmpz_mod_mat_mul(C, A, B, ctx) fmpz_mod_mat_mul(C, A, B)
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
src/flint/types/fmpz_mod_mat.c:11676:7: note: in expansion of macro ‘compat_fmpz_mod_mat_mul’
11676 |       compat_fmpz_mod_mat_mul(__pyx_v_res->val, __pyx_v_res->val, __pyx_v_tmp->val, __pyx_v_self->ctx->val);
      |       ^~~~~~~~~~~~~~~~~~~~~~~
src/flint/types/fmpz_mod_mat.c:1330:51: note: referencing argument 1 of type ‘fmpz_mod_mat_struct[1]’
 1330 |     #define compat_fmpz_mod_mat_mul(C, A, B, ctx) fmpz_mod_mat_mul(C, A, B)
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
src/flint/types/fmpz_mod_mat.c:11676:7: note: in expansion of macro ‘compat_fmpz_mod_mat_mul’
11676 |       compat_fmpz_mod_mat_mul(__pyx_v_res->val, __pyx_v_res->val, __pyx_v_tmp->val, __pyx_v_self->ctx->val);
      |       ^~~~~~~~~~~~~~~~~~~~~~~
src/flint/types/fmpz_mod_mat.c:1330:51: warning: ‘fmpz_mod_mat_mul’ reading 40 bytes from a region of size 32 [-Wstringop-overread]
 1330 |     #define compat_fmpz_mod_mat_mul(C, A, B, ctx) fmpz_mod_mat_mul(C, A, B)
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions