[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in memcoll module (+ another sync from coreutils)
From: |
Paul Eggert |
Subject: |
Re: bug in memcoll module (+ another sync from coreutils) |
Date: |
Tue, 10 Jan 2006 13:35:06 -0800 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Bruno Haible <address@hidden> writes:
> IMO, the fix depends whether you trust memcmp() these days.
> If yes, then do not require AC_FUNC_MEMCMP.
> If no, then make a dependency from 'memcoll' to 'memcmp'. And then you don't
> need to require AC_FUNC_MEMCMP either, since the gnulib-tool
> dependency mechanism will take care of invoking gl_FUNC_MEMCMP.
I Googled around for memcmp failures and found only apparent failure
that autoconf found (in BSD/OS in 2000, which is a bit marginal; see
<http://groups.google.com/group/comp.lang.perl.modules/msg/bb85f1db96a45959>)
so I think we can leave this up to each individual maintainer, most of
whom won't care.
> In either case, the appended patch should be part of the fix.
Thanks. I installed that. I also synced today's coreutils fixes,
as follows:
2006-01-10 Jim Meyering <address@hidden>
Avoid the double-free (first in fts_read, second in fts_close) that
would occur when an `active' directory is made inaccessible (e.g.,
via chmod a-x) during a traversal.
* lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
before returning. Reproduce this failure by
mkdir -p a/b; cd a; chmod a-x . b
Reported by Stavros Passas.
* lib/sha1.c: Tweak grammar in a comment.
* m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
Patch by Joerg Sonnenberger.
* m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
the 2002-12-31 change. Problem and fix reported by Bruno Haible.
People who are still concerned with buggy memcmp implementations
can invoke gl_FUNC_MEMCMP themselves.
--- lib/fts.c 9 Jan 2006 23:13:56 -0000 1.8
+++ lib/fts.c 10 Jan 2006 21:27:33 -0000
@@ -522,6 +522,7 @@ next: tmp = p;
if (p->fts_level == FTS_ROOTLEVEL) {
if (FCHDIR(sp, sp->fts_rfd)) {
SET(FTS_STOP);
+ sp->fts_cur = p;
return (NULL);
}
fts_load(sp, p);
--- lib/sha1.c 17 Oct 2005 12:55:00 -0000 1.5
+++ lib/sha1.c 10 Jan 2006 21:27:33 -0000
@@ -77,7 +77,7 @@ sha1_init_ctx (struct sha1_ctx *ctx)
must be in little endian byte order.
IMPORTANT: On some systems it is required that RESBUF is correctly
- aligned for a 32 bits value. */
+ aligned for a 32-bit value. */
void *
sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf)
{
@@ -94,7 +94,7 @@ sha1_read_ctx (const struct sha1_ctx *ct
prolog according to the standard and write the result to RESBUF.
IMPORTANT: On some systems it is required that RESBUF is correctly
- aligned for a 32 bits value. */
+ aligned for a 32-bit value. */
void *
sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf)
{
--- m4/fpending.m4 30 Oct 2005 23:06:58 -0000 1.13
+++ m4/fpending.m4 10 Jan 2006 21:27:33 -0000
@@ -1,6 +1,6 @@
-#serial 7
+#serial 8
-# Copyright (C) 2000, 2001, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -20,6 +20,7 @@ AC_DEFUN([gl_FUNC_FPENDING],
AC_CHECK_HEADERS(stdio_ext.h)
AC_REPLACE_FUNCS([__fpending])
fp_headers='
+# include <stdio.h>
# if HAVE_STDIO_EXT_H
# include <stdio_ext.h>
# endif
--- m4/memcoll.m4 21 Mar 2005 22:06:27 -0000 1.5
+++ m4/memcoll.m4 10 Jan 2006 21:34:38 -0000 1.7
@@ -1,5 +1,5 @@
-# memcoll.m4 serial 5
-dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+# memcoll.m4 serial 6
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -10,6 +10,5 @@ AC_DEFUN([gl_MEMCOLL],
AC_LIBOBJ([memcoll])
dnl Prerequisites of lib/memcoll.c.
- AC_REQUIRE([AC_FUNC_MEMCMP])
AC_FUNC_STRCOLL
])
- bug in memcoll module, Bruno Haible, 2006/01/10
- Re: bug in memcoll module (+ another sync from coreutils),
Paul Eggert <=