Bug#374565: bash: printf from dlocate segfaults with fr_FR.UTF-8 locale

2006-06-26 Thread Justin Pryzby
tag 374565 confirmed
thanks

On Sun, Jun 25, 2006 at 12:28:11AM +0200, Fr??d??ric Bothamy wrote:
 * Justin Pryzby [EMAIL PROTECTED] [2006-06-24 12:03] :
 
 [...]
 
   (gdb) r
   Starting program: /home/fred/debian/bash/bash-3.1/build-bash/bash 
   [EMAIL PROTECTED]:~/debian/bash/bash-3.1/build-bash$ COLUMNS=$(stty -a 
   2- | sed -ne '/columns/s/.*columns \([0-9]*\)[^0-9].*/\1/p');
   [EMAIL PROTECTED]:~/debian/bash/bash-3.1/build-bash$ 
   ((fieldw=(COLUMNS-24)/4));
   [EMAIL PROTECTED]:~/debian/bash/bash-3.1/build-bash$ 
   ((fieldd=COLUMNS-fieldw*2-6));
   [EMAIL PROTECTED]:~/debian/bash/bash-3.1/build-bash$ while read stat name 
   ver descr; do printf %-2s  %-${fieldw}.${fieldw}s %-${fieldw}.${fieldw}s 
   %-${fieldd}.${fieldd}s\\n $stat $name $ver $descr; done  
   /home/fred/dlocate/dpkg-list_fr
   [...]
   
   pn  libregexp-shellish-perl n?ant(aucune 
   description n'est disponible)
   pn  libregexx-dev   n?ant(aucune 
   description n'est disponible)
   pn  libregexx1  n?ant(aucune 
   description n'est disponible)
   pn  libregexx1c102  n?ant(aucune 
   description n'est disponible)
   pn  libreiser4-dev  n?ant(aucune 
   description n'est disponible)
   
   Program received signal SIGSEGV, Segmentation fault.
  So this really is a bash bug.

   Notes:
   - the file /home/fred/dlocate/dpkg-list_fr is a dlocate dpkg-list
   file (I can send it to you if you want, it's about 133 kB bzip2-ed)
  Please send a copy to the bug log.
 
 Attached (bzip2 compressed).
I can confirm this crash under LC_ALL=fr_FR.UTF8.

Justin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#374565: bash: printf from dlocate segfaults with fr_FR.UTF-8 locale

2006-06-24 Thread Frédéric Bothamy
* Justin Pryzby [EMAIL PROTECTED] [2006-06-23 14:24] :
 On Fri, Jun 23, 2006 at 01:27:18AM +0200, Fr??d??ric Bothamy wrote:
  * Justin Pryzby [EMAIL PROTECTED] [2006-06-21 08:47] :
   On Wed, Jun 21, 2006 at 02:25:31AM +0200, Fr??d??ric Bothamy wrote:
  
  [...]
  
pn  openoffice.org2-core n?ant 
(aucune description n'est disponible)   
 
/usr/bin/dlocate: line 55: 26638 Doneegrep $1 
$DPKGLIST
 26639 Erreur de segmentation  | while read stat name ver descr; do
printf %-2s  %-${fieldw}.${fieldw}s %-${fieldw}.${fieldw}s 
%-${fieldd}.${fieldd}s\\n $stat $name $ver $descr;
done

Program exited normally.
(gdb)

Do you have another idea?
   Is egrep the one segfaulting?  You can do the same as before to build
   a grep deb with debugging symbols, then just dpkg -i
   ../grep_deb.  apt-get {--re,}install grep later if you wish.
   
   It isn't completely clear to me how gdb would handle debugging the
   grep; you might have to change the shell script to use
   
 'gdb egrep $1 $DPKGLIST'
   
   instead, or just dump $1 and $DPKGLIST to a file to fiddle with it
   manually.
  
  Hello Justin,
  
  Thanks for your help.
  
  I have tried to see if this was a problem with egrep and I have replaced
  the egrep in the dlocate script with a simple cat $DPKGLIST. The
  segfault also occurs. But it does not occur if I use a head $DPKGLIST.
 What is the contents of $DPKGLIST?  you should
 echo $DPKGLIST /tmp/testgrep
 
 The quotes are important.  It occurs to me that, without quotes, you
 could end up with $DPKGLIST being its own command, eg. if it contains
 any of: ;` or such characters..  But this is perhaps also intentional
 (and ` is still evaluated within  quotes).

Sorry, I realize that I have quite unclear. $DPKGLIST is
/var/lib/dlocate/dpkg-list, this file contains the output of:

LINES=40 COLUMNS=200 dpkg -l * | sed -e '1,5d' -e 's/  */ /g'

using the current locale.
 
  I have found that the problem only occurs if I send 276 lines (or more)
  of text to the | while 
 Interesting..
 
  If I try to execute the dlocate script with sh -x at the beginning
  of the script, I need 373 lines to get the segmentation error.
  
  If I execute the lines of the script at the command prompt, I get an
  error with 22504. Here is the exact command that I used:
 22504 is the number of lines of input, the line number, or a PID?

Argh, my fault again for being very unclear :-(. 22504 is the number
of lines which is causing a segmentation error in this cas.
 
  $ echo $COLUMNS
  150
  $ ((fieldw=(COLUMNS-24)/4))
  $ ((fieldd=COLUMNS-fieldw*2-6))
  $ cat dpkg-list_fr | while read stat name ver descr; do printf %-2s 
  %-${fieldw}.${fieldw}s %-${fieldw}.${fieldw}s %-${fieldd}.${fieldd}s\\n
  $stat $name $ver $descr; done
 Does this crash cat, printf, or what?  You can get rid of the cat by
 rewriting as:
 
   while read .. .. .. ..; do ..; done dpkg-list_fr
 
 I suspect this is a bash problem with wide characters or such.

You are right. I have used the following procedure to debug my problem
(I try to be more precise than before):

[EMAIL PROTECTED]:~/debian/bash/bash-3.1/build-bash$ gdb ./bash
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as i486-linux-gnu...Using host libthread_db
library /usr/lib/debug/libthread_db.so.1.

(gdb) r
Starting program: /home/fred/debian/bash/bash-3.1/build-bash/bash 
[EMAIL PROTECTED]:~/debian/bash/bash-3.1/build-bash$ COLUMNS=$(stty -a 2- | 
sed -ne '/columns/s/.*columns \([0-9]*\)[^0-9].*/\1/p');
[EMAIL PROTECTED]:~/debian/bash/bash-3.1/build-bash$ ((fieldw=(COLUMNS-24)/4));
[EMAIL PROTECTED]:~/debian/bash/bash-3.1/build-bash$ 
((fieldd=COLUMNS-fieldw*2-6));
[EMAIL PROTECTED]:~/debian/bash/bash-3.1/build-bash$ while read stat name ver 
descr; do printf %-2s  %-${fieldw}.${fieldw}s %-${fieldw}.${fieldw}s 
%-${fieldd}.${fieldd}s\\n $stat $name $ver $descr; done  
/home/fred/dlocate/dpkg-list_fr
[...]

pn  libregexp-shellish-perl néant(aucune description 
n'est disponible)
pn  libregexx-dev   néant(aucune description 
n'est disponible)
pn  libregexx1  néant(aucune description 
n'est disponible)
pn  libregexx1c102  néant(aucune description 
n'est disponible)
pn  libreiser4-dev  néant(aucune description 
n'est disponible)  

Bug#374565: bash: printf from dlocate segfaults with fr_FR.UTF-8 locale

2006-06-24 Thread Justin Pryzby
reassign 374565 bash
tag 374565 upstream
thanks

On Sat, Jun 24, 2006 at 03:46:43PM +0200, Frédéric Bothamy wrote:
 * Justin Pryzby [EMAIL PROTECTED] [2006-06-23 14:24] :
  On Fri, Jun 23, 2006 at 01:27:18AM +0200, Fr??d??ric Bothamy wrote:
   * Justin Pryzby [EMAIL PROTECTED] [2006-06-21 08:47] :
On Wed, Jun 21, 2006 at 02:25:31AM +0200, Fr??d??ric Bothamy wrote:
   
   [...]
   
 pn  openoffice.org2-core n?ant 
 (aucune description n'est disponible) 

 /usr/bin/dlocate: line 55: 26638 Doneegrep $1 
 $DPKGLIST
  26639 Erreur de segmentation  | while read stat name ver descr; 
 do
 printf %-2s  %-${fieldw}.${fieldw}s %-${fieldw}.${fieldw}s 
 %-${fieldd}.${fieldd}s\\n $stat $name $ver $descr;
 done
 
 Program exited normally.
 (gdb)
 
 Do you have another idea?
Is egrep the one segfaulting?  You can do the same as before to build
a grep deb with debugging symbols, then just dpkg -i
../grep_deb.  apt-get {--re,}install grep later if you wish.

It isn't completely clear to me how gdb would handle debugging the
grep; you might have to change the shell script to use

  'gdb egrep $1 $DPKGLIST'

instead, or just dump $1 and $DPKGLIST to a file to fiddle with it
manually.
   
   Hello Justin,
   
   Thanks for your help.
   
   I have tried to see if this was a problem with egrep and I have replaced
   the egrep in the dlocate script with a simple cat $DPKGLIST. The
   segfault also occurs. But it does not occur if I use a head $DPKGLIST.
  What is the contents of $DPKGLIST?  you should
  echo $DPKGLIST /tmp/testgrep
  
  The quotes are important.  It occurs to me that, without quotes, you
  could end up with $DPKGLIST being its own command, eg. if it contains
  any of: ;` or such characters..  But this is perhaps also intentional
  (and ` is still evaluated within  quotes).
 
 Sorry, I realize that I have quite unclear. $DPKGLIST is
 /var/lib/dlocate/dpkg-list, this file contains the output of:
 
 LINES=40 COLUMNS=200 dpkg -l * | sed -e '1,5d' -e 's/  */ /g'
 
 using the current locale.
  
   I have found that the problem only occurs if I send 276 lines (or more)
   of text to the | while 
  Interesting..
  
   If I try to execute the dlocate script with sh -x at the beginning
   of the script, I need 373 lines to get the segmentation error.
   
   If I execute the lines of the script at the command prompt, I get an
   error with 22504. Here is the exact command that I used:
  22504 is the number of lines of input, the line number, or a PID?
 
 Argh, my fault again for being very unclear :-(. 22504 is the number
 of lines which is causing a segmentation error in this cas.
  
   $ echo $COLUMNS
   150
   $ ((fieldw=(COLUMNS-24)/4))
   $ ((fieldd=COLUMNS-fieldw*2-6))
   $ cat dpkg-list_fr | while read stat name ver descr; do printf %-2s 
   %-${fieldw}.${fieldw}s %-${fieldw}.${fieldw}s %-${fieldd}.${fieldd}s\\n
   $stat $name $ver $descr; done
  Does this crash cat, printf, or what?  You can get rid of the cat by
  rewriting as:
  
while read .. .. .. ..; do ..; done dpkg-list_fr
  
  I suspect this is a bash problem with wide characters or such.
 
 You are right. I have used the following procedure to debug my problem
 (I try to be more precise than before):
 
 [EMAIL PROTECTED]:~/debian/bash/bash-3.1/build-bash$ gdb ./bash
 GNU gdb 6.4.90-debian
 Copyright (C) 2006 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain conditions.
 Type show copying to see the conditions.
 There is absolutely no warranty for GDB.  Type show warranty for details.
 This GDB was configured as i486-linux-gnu...Using host libthread_db
 library /usr/lib/debug/libthread_db.so.1.
 
 (gdb) r
 Starting program: /home/fred/debian/bash/bash-3.1/build-bash/bash 
 [EMAIL PROTECTED]:~/debian/bash/bash-3.1/build-bash$ COLUMNS=$(stty -a 2- | 
 sed -ne '/columns/s/.*columns \([0-9]*\)[^0-9].*/\1/p');
 [EMAIL PROTECTED]:~/debian/bash/bash-3.1/build-bash$ 
 ((fieldw=(COLUMNS-24)/4));
 [EMAIL PROTECTED]:~/debian/bash/bash-3.1/build-bash$ 
 ((fieldd=COLUMNS-fieldw*2-6));
 [EMAIL PROTECTED]:~/debian/bash/bash-3.1/build-bash$ while read stat name ver 
 descr; do printf %-2s  %-${fieldw}.${fieldw}s %-${fieldw}.${fieldw}s 
 %-${fieldd}.${fieldd}s\\n $stat $name $ver $descr; done  
 /home/fred/dlocate/dpkg-list_fr
 [...]
 
 pn  libregexp-shellish-perl néant(aucune 
 description n'est disponible)
 pn  libregexx-dev   néant(aucune 
 description n'est disponible)
 pn  libregexx1  néant(aucune 
 description n'est disponible)

Bug#374565: bash: printf from dlocate segfaults with fr_FR.UTF-8 locale

2006-06-23 Thread Justin Pryzby
On Fri, Jun 23, 2006 at 01:27:18AM +0200, Fr??d??ric Bothamy wrote:
 * Justin Pryzby [EMAIL PROTECTED] [2006-06-21 08:47] :
  On Wed, Jun 21, 2006 at 02:25:31AM +0200, Fr??d??ric Bothamy wrote:
 
 [...]
 
   pn  openoffice.org2-core n?ant 
   (aucune description n'est disponible) 
  
   /usr/bin/dlocate: line 55: 26638 Doneegrep $1 
   $DPKGLIST
26639 Erreur de segmentation  | while read stat name ver descr; do
   printf %-2s  %-${fieldw}.${fieldw}s %-${fieldw}.${fieldw}s 
   %-${fieldd}.${fieldd}s\\n $stat $name $ver $descr;
   done
   
   Program exited normally.
   (gdb)
   
   Do you have another idea?
  Is egrep the one segfaulting?  You can do the same as before to build
  a grep deb with debugging symbols, then just dpkg -i
  ../grep_deb.  apt-get {--re,}install grep later if you wish.
  
  It isn't completely clear to me how gdb would handle debugging the
  grep; you might have to change the shell script to use
  
'gdb egrep $1 $DPKGLIST'
  
  instead, or just dump $1 and $DPKGLIST to a file to fiddle with it
  manually.
 
 Hello Justin,
 
 Thanks for your help.
 
 I have tried to see if this was a problem with egrep and I have replaced
 the egrep in the dlocate script with a simple cat $DPKGLIST. The
 segfault also occurs. But it does not occur if I use a head $DPKGLIST.
What is the contents of $DPKGLIST?  you should
echo $DPKGLIST /tmp/testgrep

The quotes are important.  It occurs to me that, without quotes, you
could end up with $DPKGLIST being its own command, eg. if it contains
any of: ;` or such characters..  But this is perhaps also intentional
(and ` is still evaluated within  quotes).

 I have found that the problem only occurs if I send 276 lines (or more)
 of text to the | while 
Interesting..

 If I try to execute the dlocate script with sh -x at the beginning
 of the script, I need 373 lines to get the segmentation error.
 
 If I execute the lines of the script at the command prompt, I get an
 error with 22504. Here is the exact command that I used:
22504 is the number of lines of input, the line number, or a PID?

 $ echo $COLUMNS
 150
 $ ((fieldw=(COLUMNS-24)/4))
 $ ((fieldd=COLUMNS-fieldw*2-6))
 $ cat dpkg-list_fr | while read stat name ver descr; do printf %-2s 
 %-${fieldw}.${fieldw}s %-${fieldw}.${fieldw}s %-${fieldd}.${fieldd}s\\n
 $stat $name $ver $descr; done
Does this crash cat, printf, or what?  You can get rid of the cat by
rewriting as:

  while read .. .. .. ..; do ..; done dpkg-list_fr

I suspect this is a bash problem with wide characters or such.

Justin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#374565: bash: printf from dlocate segfaults with fr_FR.UTF-8 locale

2006-06-22 Thread Frédéric Bothamy
* Justin Pryzby [EMAIL PROTECTED] [2006-06-21 08:47] :
 On Wed, Jun 21, 2006 at 02:25:31AM +0200, Fr??d??ric Bothamy wrote:

[...]

  pn  openoffice.org2-core n?ant 
  (aucune description n'est disponible)   
   
  /usr/bin/dlocate: line 55: 26638 Doneegrep $1 
  $DPKGLIST
   26639 Erreur de segmentation  | while read stat name ver descr; do
  printf %-2s  %-${fieldw}.${fieldw}s %-${fieldw}.${fieldw}s 
  %-${fieldd}.${fieldd}s\\n $stat $name $ver $descr;
  done
  
  Program exited normally.
  (gdb)
  
  Do you have another idea?
 Is egrep the one segfaulting?  You can do the same as before to build
 a grep deb with debugging symbols, then just dpkg -i
 ../grep_deb.  apt-get {--re,}install grep later if you wish.
 
 It isn't completely clear to me how gdb would handle debugging the
 grep; you might have to change the shell script to use
 
   'gdb egrep $1 $DPKGLIST'
 
 instead, or just dump $1 and $DPKGLIST to a file to fiddle with it
 manually.

Hello Justin,

Thanks for your help.

I have tried to see if this was a problem with egrep and I have replaced
the egrep in the dlocate script with a simple cat $DPKGLIST. The
segfault also occurs. But it does not occur if I use a head $DPKGLIST.
I have found that the problem only occurs if I send 276 lines (or more)
of text to the | while 

If I try to execute the dlocate script with sh -x at the beginning
of the script, I need 373 lines to get the segmentation error.

If I execute the lines of the script at the command prompt, I get an
error with 22504. Here is the exact command that I used:

$ echo $COLUMNS
150
$ ((fieldw=(COLUMNS-24)/4))
$ ((fieldd=COLUMNS-fieldw*2-6))
$ cat dpkg-list_fr | while read stat name ver descr; do printf %-2s 
%-${fieldw}.${fieldw}s %-${fieldw}.${fieldw}s %-${fieldd}.${fieldd}s\\n
$stat $name $ver $descr; done

fieldw is 31, fieldd 82. dpkg-list_fr is the file generated by the
dlocate cron job:

$ LINES=40 COLUMNS=200 dpkg -l * | sed -e '1,5d' -e 's/  */ /g' $DPKGLIST

for the fr_FR.UTF-8 locale.

Greetings,


Fred


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#374565: bash: printf from dlocate segfaults with fr_FR.UTF-8 locale

2006-06-21 Thread Justin Pryzby
On Wed, Jun 21, 2006 at 02:25:31AM +0200, Fr??d??ric Bothamy wrote:
 * Justin Pryzby [EMAIL PROTECTED] [2006-06-20 07:52] :
  On Tue, Jun 20, 2006 at 01:27:46AM +0200, Fr??d??ric Bothamy wrote:
   Package: bash
   Version: 3.1-4
   Severity: normal
   Tags: l10n
   
   Hello,
   
   Here are the steps to reproduce the problem:
   
   - have (and use) an fr_FR.UTF-8 locale
   - install the dlocate package
   - generate dpkg-list (localized) using this command (from 
   /etc/cron.daily/dlocate):
   
   LINES=40 COLUMNS=200 dpkg -l * | sed -e '1,5d' -e 's/  */ /g'  
   /var/lib/dlocate/dpkg-list
   
   - use dlocate like this:
   $ dlocate -l openoffice
   
   The final lines read:
   
   $ dlocate -l openoffice
   
   [...]
   
   un  openoffice.org2-l10n-el   n?ant  (aucune 
   description n'est disponible)
   pn  openoffice.org2-l10n-en-gbn?ant  (aucune 
   description n'est disponible)
   pn  openoffice.org2-l10n-en-usn?ant  (aucune 
   description n'est disponible)
   /usr/bin/dlocate: line 55: 14278 Doneegrep $1 
   $DPKGLIST
14279 Erreur de segmentation  | while read stat name ver descr; do
   printf %-2s  %-${fieldw}.${fieldw}s %-${fieldw}.${fieldw}s 
   %-${fieldd}.${fieldd}s\\n $stat $name $ver $descr;
   done
   $
   
   If I change the printf command with /usr/sbin/printf, the segfault no
  Do you mean coreutils /usr/bin/printf?
 
 Yes, correct.
  
   longer occurs. If I generate the dpkg-list file with the C locale, the
   segfault no longer occurs. If I execute the dlocate command with the C
   locale, the segfault no longer occurs.
   
   I don't really know how to get a backtrace from a builtin bash
   command. So any advice would be welcome.
  apt-get source bash dpkg-dev
  cd bash-...
  DEB_BUILD_OPTIONS=nostrip dpkg-buildpackage -rfakeroot
  gdb --args ./debian/bash/usr/bin/bash dlocate -l openoffice
 
 Rather gdb --args ./debian/bash/bin/bash dlocate -l openoffice
 (without /usr). However, this does not help to get a backtrace file:
 
 [EMAIL PROTECTED]:~/debian/bash/bash-3.1$ gdb --args ./debian/bash/bin/bash 
 dlocate -l openoffice
 GNU gdb 6.4.90-debian
 Copyright (C) 2006 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain conditions.
 Type show copying to see the conditions.
 There is absolutely no warranty for GDB.  Type show warranty for details.
 This GDB was configured as i486-linux-gnu...Using host libthread_db library 
 /lib/tls/libthread_db.so.1.
 
 (gdb) r
 Starting program: /home/fred/debian/bash/bash-3.1/debian/bash/bin/bash 
 dlocate -l openoffice
 Desired=Unknown/Install/Remove/Purge/Hold
 | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
 |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: 
 uppercase=bad)
 ||/ Name Version  
 Description
 +++---==
 
 [...]
 
 pn  openoffice.org2-core n?ant (aucune 
 description n'est disponible)
 /usr/bin/dlocate: line 55: 26638 Doneegrep $1 $DPKGLIST
  26639 Erreur de segmentation  | while read stat name ver descr; do
 printf %-2s  %-${fieldw}.${fieldw}s %-${fieldw}.${fieldw}s 
 %-${fieldd}.${fieldd}s\\n $stat $name $ver $descr;
 done
 
 Program exited normally.
 (gdb)
 
 Do you have another idea?
Is egrep the one segfaulting?  You can do the same as before to build
a grep deb with debugging symbols, then just dpkg -i
../grep_deb.  apt-get {--re,}install grep later if you wish.

It isn't completely clear to me how gdb would handle debugging the
grep; you might have to change the shell script to use

  'gdb egrep $1 $DPKGLIST'

instead, or just dump $1 and $DPKGLIST to a file to fiddle with it
manually.

Justin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#374565: bash: printf from dlocate segfaults with fr_FR.UTF-8 locale

2006-06-20 Thread Justin Pryzby
On Tue, Jun 20, 2006 at 01:27:46AM +0200, Fr??d??ric Bothamy wrote:
 Package: bash
 Version: 3.1-4
 Severity: normal
 Tags: l10n
 
 Hello,
 
 Here are the steps to reproduce the problem:
 
 - have (and use) an fr_FR.UTF-8 locale
 - install the dlocate package
 - generate dpkg-list (localized) using this command (from 
 /etc/cron.daily/dlocate):
 
 LINES=40 COLUMNS=200 dpkg -l * | sed -e '1,5d' -e 's/  */ /g'  
 /var/lib/dlocate/dpkg-list
 
 - use dlocate like this:
 $ dlocate -l openoffice
 
 The final lines read:
 
 $ dlocate -l openoffice
 
 [...]
 
 un  openoffice.org2-l10n-el   n?ant  (aucune 
 description n'est disponible)
 pn  openoffice.org2-l10n-en-gbn?ant  (aucune 
 description n'est disponible)
 pn  openoffice.org2-l10n-en-usn?ant  (aucune 
 description n'est disponible)
 /usr/bin/dlocate: line 55: 14278 Doneegrep $1 $DPKGLIST
  14279 Erreur de segmentation  | while read stat name ver descr; do
 printf %-2s  %-${fieldw}.${fieldw}s %-${fieldw}.${fieldw}s 
 %-${fieldd}.${fieldd}s\\n $stat $name $ver $descr;
 done
 $
 
 If I change the printf command with /usr/sbin/printf, the segfault no
Do you mean coreutils /usr/bin/printf?

 longer occurs. If I generate the dpkg-list file with the C locale, the
 segfault no longer occurs. If I execute the dlocate command with the C
 locale, the segfault no longer occurs.
 
 I don't really know how to get a backtrace from a builtin bash
 command. So any advice would be welcome.
apt-get source bash dpkg-dev
cd bash-...
DEB_BUILD_OPTIONS=nostrip dpkg-buildpackage -rfakeroot
gdb --args ./debian/bash/usr/bin/bash dlocate -l openoffice


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#374565: bash: printf from dlocate segfaults with fr_FR.UTF-8 locale

2006-06-20 Thread Frédéric Bothamy
* Justin Pryzby [EMAIL PROTECTED] [2006-06-20 07:52] :
 On Tue, Jun 20, 2006 at 01:27:46AM +0200, Fr??d??ric Bothamy wrote:
  Package: bash
  Version: 3.1-4
  Severity: normal
  Tags: l10n
  
  Hello,
  
  Here are the steps to reproduce the problem:
  
  - have (and use) an fr_FR.UTF-8 locale
  - install the dlocate package
  - generate dpkg-list (localized) using this command (from 
  /etc/cron.daily/dlocate):
  
  LINES=40 COLUMNS=200 dpkg -l * | sed -e '1,5d' -e 's/  */ /g'  
  /var/lib/dlocate/dpkg-list
  
  - use dlocate like this:
  $ dlocate -l openoffice
  
  The final lines read:
  
  $ dlocate -l openoffice
  
  [...]
  
  un  openoffice.org2-l10n-el   n?ant  (aucune 
  description n'est disponible)
  pn  openoffice.org2-l10n-en-gbn?ant  (aucune 
  description n'est disponible)
  pn  openoffice.org2-l10n-en-usn?ant  (aucune 
  description n'est disponible)
  /usr/bin/dlocate: line 55: 14278 Doneegrep $1 
  $DPKGLIST
   14279 Erreur de segmentation  | while read stat name ver descr; do
  printf %-2s  %-${fieldw}.${fieldw}s %-${fieldw}.${fieldw}s 
  %-${fieldd}.${fieldd}s\\n $stat $name $ver $descr;
  done
  $
  
  If I change the printf command with /usr/sbin/printf, the segfault no
 Do you mean coreutils /usr/bin/printf?

Yes, correct.
 
  longer occurs. If I generate the dpkg-list file with the C locale, the
  segfault no longer occurs. If I execute the dlocate command with the C
  locale, the segfault no longer occurs.
  
  I don't really know how to get a backtrace from a builtin bash
  command. So any advice would be welcome.
 apt-get source bash dpkg-dev
 cd bash-...
 DEB_BUILD_OPTIONS=nostrip dpkg-buildpackage -rfakeroot
 gdb --args ./debian/bash/usr/bin/bash dlocate -l openoffice

Rather gdb --args ./debian/bash/bin/bash dlocate -l openoffice
(without /usr). However, this does not help to get a backtrace file:

[EMAIL PROTECTED]:~/debian/bash/bash-3.1$ gdb --args ./debian/bash/bin/bash 
dlocate -l openoffice
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as i486-linux-gnu...Using host libthread_db library 
/lib/tls/libthread_db.so.1.

(gdb) r
Starting program: /home/fred/debian/bash/bash-3.1/debian/bash/bin/bash dlocate 
-l openoffice
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version  
Description
+++---==

[...]

pn  openoffice.org2-core néant (aucune 
description n'est disponible)
/usr/bin/dlocate: line 55: 26638 Doneegrep $1 $DPKGLIST
 26639 Erreur de segmentation  | while read stat name ver descr; do
printf %-2s  %-${fieldw}.${fieldw}s %-${fieldw}.${fieldw}s 
%-${fieldd}.${fieldd}s\\n $stat $name $ver $descr;
done

Program exited normally.
(gdb)

Do you have another idea?

Thanks,


Fred



Bug#374565: bash: printf from dlocate segfaults with fr_FR.UTF-8 locale

2006-06-19 Thread Frédéric Bothamy
Package: bash
Version: 3.1-4
Severity: normal
Tags: l10n

Hello,

Here are the steps to reproduce the problem:

- have (and use) an fr_FR.UTF-8 locale
- install the dlocate package
- generate dpkg-list (localized) using this command (from 
/etc/cron.daily/dlocate):

LINES=40 COLUMNS=200 dpkg -l * | sed -e '1,5d' -e 's/  */ /g'  
/var/lib/dlocate/dpkg-list

- use dlocate like this:
$ dlocate -l openoffice

The final lines read:

$ dlocate -l openoffice

[...]

un  openoffice.org2-l10n-el   néant  (aucune 
description n'est disponible)
pn  openoffice.org2-l10n-en-gbnéant  (aucune 
description n'est disponible)
pn  openoffice.org2-l10n-en-usnéant  (aucune 
description n'est disponible)
/usr/bin/dlocate: line 55: 14278 Doneegrep $1 $DPKGLIST
 14279 Erreur de segmentation  | while read stat name ver descr; do
printf %-2s  %-${fieldw}.${fieldw}s %-${fieldw}.${fieldw}s 
%-${fieldd}.${fieldd}s\\n $stat $name $ver $descr;
done
$

If I change the printf command with /usr/sbin/printf, the segfault no
longer occurs. If I generate the dpkg-list file with the C locale, the
segfault no longer occurs. If I execute the dlocate command with the C
locale, the segfault no longer occurs.

I don't really know how to get a backtrace from a builtin bash
command. So any advice would be welcome.

Greetings,


Fred

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (990, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages bash depends on:
ii  base-files3.1.13 Debian base system miscellaneous f
ii  debianutils   2.16.1 Miscellaneous utilities specific t
ii  libc6 2.3.6-15   GNU C Library: Shared libraries
ii  libncurses5   5.5-2  Shared libraries for terminal hand

bash recommends no packages.

-- no debconf information