This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug string/21014] i686 memchr overflows internal pointer check


https://sourceware.org/bugzilla/show_bug.cgi?id=21014

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  23d27709a423aec32821e9a5198a10267107bae2 (commit)
      from  62210e7eb1b270c72c2ee61a14015285cd817262 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=23d27709a423aec32821e9a5198a10267107bae2

commit 23d27709a423aec32821e9a5198a10267107bae2
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Jan 2 12:20:21 2017 -0200

    Fix i686 memchr for large input sizes

    Similar to BZ#19387 and BZ#20971, both i686 memchr optimized assembly
    implementations (memchr-sse2-bsf and memchr-sse2) do not handle the
    size overflow correctly.

    It is shown by the new tests added by commit 3daef2c8ee4df29, where
    both implementation fails with size as SIZE_MAX.

    This patch uses a similar strategy used on 3daef2c8ee4df2, where
    saturared math is used for overflow case.

    Checked on i686-linux-gnu.

        [BZ #21014]
        * sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S (MEMCHR): Avoid
overflow
        in pointer addition.
        * sysdeps/i386/i686/multiarch/memchr-sse2.S (MEMCHR): Likewise.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                     |    7 +++++++
 sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S |   10 ++++++++--
 sysdeps/i386/i686/multiarch/memchr-sse2.S     |    8 +++++++-
 3 files changed, 22 insertions(+), 3 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]