[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix misalignment
From: |
Jim Meyering |
Subject: |
Re: Fix misalignment |
Date: |
Tue, 24 Jul 2007 10:05:51 +0200 |
Paul Eggert <address@hidden> wrote:
> diff --git a/src/sort.c b/src/sort.c
> index 824dd0d..c3e87ad 100644
> --- a/src/sort.c
> +++ b/src/sort.c
Thanks for the patch.
I've applied it, with a more accurate ChangeLog entry:
2007-07-23 Paul Eggert <address@hidden>
sort: avoid unaligned access.
* src/sort.c (fillbuf): When enlarging the line buffer, ensure that
the new size is a multiple of "sizeof (struct line)". This avoids
alignment problems when indexing from the end of the buffer.
Problem reported by Andreas Schwab in
<http://lists.gnu.org/archive/html/bug-coreutils/2007-07/msg00158.html>.
Then I added a test:
2007-07-24 Jim Meyering <address@hidden>
sort: add a test to exercise the affected code.
* tests/sort/Test.pm (realloc-buf): Exercise the code that changed
yesterday. No other test in all of "make check" does this.
* NEWS: Mention the fix.
For details, see:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=summary
Re: Fix misalignment, Paul Eggert, 2007/07/23