https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127794

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Gaius Mulley <[email protected]>:

https://gcc.gnu.org/g:4bfd3926be8beb06786c14e5a35484f2ae63bb33

commit r17-7008-g4bfd3926be8beb06786c14e5a35484f2ae63bb33
Author: Gaius Mulley <[email protected]>
Date:   Wed Dec 2 03:09:34 2026 +0000

    PR modula2/127794: v4 ensure size parameter does not overflow on 32bit

    This is a followup patch for PR 127794 given the feedback of the
    Sashiko: GCC LLM.  The patch rewrites the LongSysStorage module
    to check that the size parameter does not overflow a CSIZE_T
    (which will be passed to malloc).  Also fixed are the format
    address specifiers to printf.

    gcc/m2/ChangeLog:

            PR modula2/127794
            * gm2-libs/LongSysStorage.def (ALLOCATE): Rename parameter
            a to addr.
            (DEALLOCATE): Ditto.
            (REALLOCATE): Ditto.
            * gm2-libs/LongSysStorage.mod: Rewrite to check for size
            overflowing CSIZE_T.

    gcc/testsuite/ChangeLog:

            PR modula2/127794
            * gm2/pim/run/pass/testlargestore.mod: New test.

    Signed-off-by: Gaius Mulley <[email protected]>
  • [Bug modula2/127794] Unable to ... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to