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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Gaius Mulley
<ga...@gcc.gnu.org>:

https://gcc.gnu.org/g:a9a6f2496848d503b337cd75ce4d8ab744bec47b

commit r15-9997-ga9a6f2496848d503b337cd75ce4d8ab744bec47b
Author: Gaius Mulley <gaiusm...@gmail.com>
Date:   Fri Jul 18 08:02:52 2025 +0100

    [PATCH] [PR modula2/120731] error in Strings.Pos causing sigsegv

    This patch corrects the m2log library procedure function
    Strings.Pos which incorrectly sliced the wrong component
    of the source string.  The incorrect slice could cause
    a sigsegv if negative slice indices were generated.

    gcc/m2/ChangeLog:

            PR modula2/120731
            * gm2-libs-log/Strings.def (Delete): Rewrite comment.
            * gm2-libs-log/Strings.mod (Pos): Rewrite.
            (PosLower): New procedure function.

    gcc/testsuite/ChangeLog:

            PR modula2/120731
            * gm2/pimlib/logitech/run/pass/teststrings.mod: New test.

    (cherry picked from commit fc276742e0db337c4d13e6c474abafd4796a6b69)

    Signed-off-by: Gaius Mulley <gaiusm...@gmail.com>

Reply via email to