Debian Bug report logs -
#123919
findutils: find segfaults on ia64
Reported by: John R.Daily <jdaily@progeny.com>
Date: Thu, 13 Dec 2001 22:48:01 UTC
Severity: important
Tags: fixed, patch
Found in version 4.1.7-2
Fixed in version findutils/4.1.20-1
Done: Andreas Metzler <ametzler@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, Kevin Dalley <kevind@rahul.net>:
Bug#123919; Package findutils.
(full text, mbox, link).
Acknowledgement sent to John R.Daily <jdaily@progeny.com>:
New Bug report received and forwarded. Copy sent to Kevin Dalley <kevind@rahul.net>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: findutils
Version: 4.1.7-2
Severity: important
Tags: patch
find lacks function prototypes in key internationalization code that
provokes segfaults on ia64 when find is called with an improper
command-line argument and the environment locale is non-C.
On ia64, unlike other 64-bit environments, pointers use high-order bits
to store address data. When a function is used with a prototype, the
compiler assumes that the return value is a (32-bit) integer, and so
in the case of a non-prototyped function that returns a pointer, the
returned value is always an illegal address.
In intl/dcgettext.c, stpcpy() is used without a prototype. In
intl/localealias.c, it's mempcpy(). In both cases, the cause is
the lack of a _GNU_SOURCE definition, so the prototypes are not
pulled in via string.h.
I've also fixed a couple of other missing prototype issues in this
patch, but the two above should be sufficient to resolve the immediate
problem. getline() is still unprototyped in frcode.c, code.c, and
bigram.c with this patch.
Adding -Wall, or at least -Wimplicit, to the gcc command-line would
have detected this problem earlier. Here are the warnings in question:
dcgettext.c:300: warning: implicit declaration of function `stpcpy'
localealias.c:231: warning: implicit declaration of function `mempcpy'
fstype.c:264: warning: implicit declaration of function `xstrtoumax'
locate.c:276: warning: implicit declaration of function `isupper'
locate.c:276: warning: implicit declaration of function `tolower'
locate.c:322: warning: implicit declaration of function `getstr'
frcode.c:131: warning: implicit declaration of function `getline'
code.c:164: warning: implicit declaration of function `getline'
bigram.c:82: warning: implicit declaration of function `getline'
diff -aur findutils.orig/find/fstype.c findutils-4.1.7/find/fstype.c
--- findutils.orig/find/fstype.c Sun May 20 14:39:37 2001
+++ findutils-4.1.7/find/fstype.c Thu Dec 13 15:19:18 2001
@@ -21,6 +21,7 @@
#include "dirname.h"
#include "modetype.h"
+#include "xstrtol.h"
#include <errno.h>
#ifdef STDC_HEADERS
#include <stdlib.h>
diff -aur findutils.orig/intl/dcgettext.c findutils-4.1.7/intl/dcgettext.c
--- findutils.orig/intl/dcgettext.c Wed Jan 26 20:27:03 2000
+++ findutils-4.1.7/intl/dcgettext.c Thu Dec 13 15:16:40 2001
@@ -19,6 +19,8 @@
# include <config.h>
#endif
+#define _GNU_SOURCE /* Get the stpcpy() prototype from string.h */
+
#include <sys/types.h>
#ifdef __GNUC__
diff -aur findutils.orig/intl/localealias.c findutils-4.1.7/intl/localealias.c
--- findutils.orig/intl/localealias.c Wed Jan 26 20:27:04 2000
+++ findutils-4.1.7/intl/localealias.c Thu Dec 13 15:15:53 2001
@@ -20,6 +20,8 @@
# include <config.h>
#endif
+#define _GNU_SOURCE /* Get mempcpy() prototype from string.h */
+
#include <ctype.h>
#include <stdio.h>
#include <sys/types.h>
diff -aur findutils.orig/locate/locate.c findutils-4.1.7/locate/locate.c
--- findutils.orig/locate/locate.c Sun May 20 14:39:37 2001
+++ findutils-4.1.7/locate/locate.c Thu Dec 13 15:20:09 2001
@@ -50,6 +50,7 @@
#define _GNU_SOURCE
#include <config.h>
#include <stdio.h>
+#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <time.h>
@@ -96,6 +97,12 @@
#include "locatedb.h"
#include <getline.h>
+
+/*
+ * Defined in getline.c; perhaps should be in getline.h
+ */
+ssize_t getstr (char **lineptr, size_t *n, FILE *stream,
+ char terminator, size_t offset);
/* Note that this evaluates C many times. */
#ifdef _LIBC
-- System Information
Debian Release: 3.0
Architecture: ia64
Kernel: Linux butthead.progeny.com 2.4.9-itanium-smp #1 SMP Mon Sep 17 20:48:35 MDT 2001 ia64
Locale: LANG=en_US, LC_CTYPE=en_US
Versions of packages findutils depends on:
ii libc6.1 2.2.4-7 GNU C Library: Shared libraries an
Tags added: fixed
Request was from Thomas Schoepf <schoepf@debian.org>
to control@bugs.debian.org.
(full text, mbox, link).
Reply sent to Andreas Metzler <ametzler@debian.org>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to John R.Daily <jdaily@progeny.com>:
Bug acknowledged by developer.
(full text, mbox, link).
Message #12 received at 123919-close@bugs.debian.org (full text, mbox, reply):
We believe that the bug you reported is fixed in the latest version of
findutils, which is due to be installed in the Debian FTP archive:
findutils_4.1.20-1.diff.gz
to pool/main/f/findutils/findutils_4.1.20-1.diff.gz
findutils_4.1.20-1.dsc
to pool/main/f/findutils/findutils_4.1.20-1.dsc
findutils_4.1.20-1_i386.deb
to pool/main/f/findutils/findutils_4.1.20-1_i386.deb
findutils_4.1.20.orig.tar.gz
to pool/main/f/findutils/findutils_4.1.20.orig.tar.gz
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 123919@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Andreas Metzler <ametzler@debian.org> (supplier of updated findutils package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Mon, 14 Jul 2003 14:38:34 +0200
Source: findutils
Binary: findutils
Architecture: source i386
Version: 4.1.20-1
Distribution: unstable
Urgency: low
Maintainer: Andreas Metzler <ametzler@debian.org>
Changed-By: Andreas Metzler <ametzler@debian.org>
Description:
findutils - utilities for finding files--find, xargs, and locate
Closes: 67507 97367 102708 109920 113139 113774 115399 117425 119603 119719 119721 123919 124178 124333 129121 132430 140941 141354 144649 149126 149716 152635 155119 161083 166085 171877 182172
Changes:
findutils (4.1.20-1) unstable; urgency=low
.
* New maintainer. Hijacked package as discussed on debian-devel and
debian-qa.
* Update texinfo docs to use @direntry to help dh_installinfo.
(Closes: #182172)
* Acknowledge Thomas' grand NMU by using dpkg-buildpackage -v4.1.7-2
* Bump standards-version to 3.6.0. (No changes required)
.
findutils (4.1.20-0.2) unstable; urgency=low
.
* repacked using debhelper and dpatch.
* move contents of debian/Changelog to debian/changelog, remove
emacs-variables from it.
* reformat debian/copyright
* Strip down debian-patch:
- weed out all the changes to .cvsignore files.
- the changes described in the diff to po/ChangeLog are included upstream
- Some the changes in #123919 seem to be unneeded now (at least I do not
get implicit declaration warnings.
- fix for #67507 (id=0 instead of name=root) included upstream.
* Remove old cruft from maintainerscripts:
- compatibility code for upgrading from versions prior to 4.1-15
(released Dec 1996) in preinst.
- Fix permissions of /var/lib/locate (4.1-16 released Jan 1997) in
postinst.
- fix executable /etc/updatedb.conf. (included since 4.1-19, Mar 1997)
* use getent instead of grep ... /etc/passwd to check for existence of
$LOCALUSER
* Use config.(guess|sub) from autotools-dev (Closes: #155119)
* Fix db-path in updatedb(1). (Closes: #171877)
.
findutils (4.1.7-2.1) unstable; urgency=low
.
* Non-Maintainer upload.
* Fixed compiler warnings about implicit declarations of various
functions.
Closes: #123919: findutils: find segfaults on ia64
* debian/rules, debian/postinst: Use numeric id 0 instead of "root"
Closes: #67507: user "root"
* Closes: #102708: locate usage message lacks final newline
Closes: #124333: Missing newline for helptext in locate
Closes: #140941: findutils: locate with no args is missing final \n
Closes: #149126: findutils: locate should print a newline after its
error message
Closes: #149716: findutils: locate doesn't print final newline
Closes: #161083: findutils: If you run locate without parameters,
there is no final newline in the output
* Closes: #117425: findutils: xargs: missing newline on "--help" output
Closes: #124178: xargs --help doesn't end in a newline
* Closes: #141354: findutils: include devfs to list PRUNEFS
* Closes: #166085: Need to exclude the mfs filesystem for mosix and
openmosix
* Closes: #113139: updatedb: please remove "auto" from PRUNEFS
Closes: #129121: I don't believe fstype AUTO should be excluded in
updatedb.conf
Closes: #132430: auto in PRUNEFS in /etc/updatedb.conf has unexpected
sideeffect!
Closes: #144649: the updatedb cron script does not work on root
filesystem type auto
Closes: #119603: locate should index filetype (auto) [ext3fs]
* Include LOCALUSER configuration into /etc/updatedb.conf
Closes: #152635: midnight updatedb always runs as nobody
* debian/cron.find: complain if $LOCALUSER does not exist.
Closes: #97367: locate-database is destroyed by /etc/cron.daily/find
* Closes: #109920: updatedb should not scan /sfs
* locate/updatedb.sh: Use a default shell of /bin/sh to run find.
Closes: #113774: findutils: updatedb makes assumption about localuser
Closes: #119719, #119721: updatedb doesn't work in cron.daily/find if
the user nobody has no login shell
* Moved locatedb from /var/lib/locate/ to /var/cache/locate/.
debian/postinst: added code to move an existing locatedb into the
new place.
Closes: #115399: findutils: locate FHS violation
Files:
ca27f9b375cd063b449e94317ad0ecf2 609 base required findutils_4.1.20-1.dsc
ef0ad11773b8144a968d48136b956aed 11458 base required findutils_4.1.20-1.diff.gz
5cb8a00d2d36e95750ffaeacc660f948 148070 base required findutils_4.1.20-1_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE/ErrhHTOcZYuNdmMRAlIlAKCJuGsJZKiEJhizoAKHItad/ebz5QCgkje2
0xHWL6Q56l8LdpehBvHaY2Y=
=J6Xo
-----END PGP SIGNATURE-----
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sat Dec 23 16:14:58 2023;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.