From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12451 invoked by alias); 30 Oct 2013 21:46:44 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 12377 invoked by uid 55); 30 Oct 2013 21:46:35 -0000 From: "cvs-commit at gcc dot gnu.org" To: glibc-bugs@sourceware.org Subject: [Bug libc/16038] A very large alignment value causes memalign/posix_memalign to loop forever Date: Wed, 30 Oct 2013 21:46:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.18 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-10/txt/msg00372.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=16038 --- Comment #2 from cvs-commit at gcc dot gnu.org --- via a56ee40b176d0a3f47f2a7eb75208f2e3763c9fd (commit) from c6e4925d4069d38843c02994ffd284e8c87c8929 (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=a56ee40b176d0a3f47f2a7eb75208f2e3763c9fd commit a56ee40b176d0a3f47f2a7eb75208f2e3763c9fd Author: Will Newton Date: Thu Oct 10 13:17:13 2013 +0100 malloc: Fix for infinite loop in memalign/posix_memalign. A very large alignment argument passed to mealign/posix_memalign causes _int_memalign to enter an infinite loop. Limit the maximum alignment value to the maximum representable power of two to prevent this from happening. Changelog: 2013-10-30 Will Newton [BZ #16038] * malloc/hooks.c (memalign_check): Limit alignment to the maximum representable power of two. * malloc/malloc.c (__libc_memalign): Likewise. * malloc/tst-memalign.c (do_test): Add test for very large alignment values. * malloc/tst-posix_memalign.c (do_test): Likewise. ----------------------------------------------------------------------- Summary of changes: ChangeLog | 10 ++++++++++ malloc/hooks.c | 8 ++++++++ malloc/malloc.c | 8 ++++++++ malloc/tst-memalign.c | 15 +++++++++++++++ malloc/tst-posix_memalign.c | 10 ++++++++++ 5 files changed, 51 insertions(+), 0 deletions(-) -- You are receiving this mail because: You are on the CC list for the bug.