Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 11170 - mutt segfaults while a config-file-command contains more than 255 chars
Summary: mutt segfaults while a config-file-command contains more than 255 chars
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: High normal (vote)
Assignee: Lars Weiler (RETIRED)
URL:
Whiteboard:
Keywords:
: 12165 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-11-24 16:47 UTC by Lars Weiler (RETIRED)
Modified: 2006-02-04 06:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild described in comment #7 (mutt-1.4-r4.ebuild,2.45 KB, text/plain)
2003-03-08 01:21 UTC, Lars Weiler (RETIRED)
Details
ebuild without errors (mutt-1.4-r4.ebuild,3.29 KB, text/plain)
2003-03-19 18:22 UTC, Lars Weiler (RETIRED)
Details
ebuild without errors (mutt-1.4-r4.ebuild,2.43 KB, text/plain)
2003-03-19 18:29 UTC, Lars Weiler (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Weiler (RETIRED) gentoo-dev 2002-11-24 16:47:39 UTC
If a config file contains a line with more than 255 chars then mutt will hang   
up with a Segmentation fault.
Comment 1 Khayyam 2002-12-05 10:34:33 UTC
I'm no longer on mutt-dev but will email upstream re this.
Comment 2 Khayyam 2002-12-09 06:25:34 UTC
OK .. i'm not having any luck with finding other reports of this. Could you
please send more details, such as gcc, glibc, binutils version and CFLAGS
machine type etc. Also an example of the string would be useful. The more
details you can gie here the better to help me track this down.
Comment 3 Mark Guertin 2002-12-13 10:16:39 UTC
The output of 'emerge info' may also be helpful :) 
Comment 4 Lars Weiler (RETIRED) gentoo-dev 2002-12-13 12:39:34 UTC
Excuse my delay.  Here are the requested information.

Nevertheless I tried another time to compile mutt and now it
starts without a segfault.  I remembered a suggested change
in the CFLAGS from -O3 in -O2 in one of the latest
system-updates.  So I compiled mutt again with -O3 and the
segfault appeared.  -O2 works fine.  Maybe it's not a mutt
but a gcc-Problem with heavy optimazation that it can't read
a string containing more than 255 chars at once?



celeborn root # uname -a
Linux celeborn.wh-og.hs-niederrhein.de 2.4.20-rc4-ben0 #6 Fre Nov 29
03:14:09 CET 2002 ppc  745/755 GNU/Linux

[The kernel is independent.  I tested it also on the
gentoo-ppc and older versions of ben0.]



celeborn root # mutt -v
Mutt 1.4i (2002-05-29)
Copyright (C) 1996-2001 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: Linux 2.4.20-rc4-ben0 (ppc) [using slang 10405]
Compile options:
-DOMAIN
-DEBUG
+HOMESPOOL  -USE_SETGID  +USE_DOTLOCK  +DL_STANDALONE
-USE_FCNTL  +USE_FLOCK
+USE_POP  +USE_IMAP  -USE_GSS  +USE_SSL  -USE_SASL
-HAVE_REGCOMP  +USE_GNU_REGEX
+HAVE_COLOR  -HAVE_START_COLOR  -HAVE_TYPEAHEAD  -HAVE_BKGDSET
-HAVE_CURS_SET  -HAVE_META  -HAVE_RESIZETERM
+HAVE_PGP  -BUFFY_SIZE -EXACT_ADDRESS  -SUN_ATTACHMENT
+ENABLE_NLS  -LOCALES_HACK  +COMPRESSED  +HAVE_WC_FUNCS
+HAVE_LANGINFO_CODESET  +HAVE_LANGINFO_YESEXPR
+HAVE_ICONV  -ICONV_NONTRANS  +HAVE_GETSID  +HAVE_GETADDRINFO
-ISPELL
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="Maildir"
PKGDATADIR="/usr/share/mutt"
SYSCONFDIR="/etc/mutt"
EXECSHELL="/bin/sh"
-MIXMASTER
To contact the developers, please mail to <mutt-dev@mutt.org>.
To report a bug, please use the flea(1) utility.

patch-1.4.rr.compressed.1



celeborn root # gcc -v
Reading specs from /usr/lib/gcc-lib/powerpc-unknown-linux-gnu/3.2.1/specs
Configured with: /var/tmp/portage/gcc-3.2.1/work/gcc-3.2.1/configure
--prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --host=powerpc-unknown-linux-gnu
--build=powerpc-unknown-linux-gnu --target=powerpc-unknown-linux-gnu
--with-system-zlib --enable-languages=c,c++,ada,f77,objc,java
--enable-threads=posix --enable-long-long --disable-checking
--enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit
--enable-version-specific-runtime-libs
--with-gxx-include-dir=/usr/include/g++-v32 --with-local-prefix=/usr/local
--enable-shared --enable-nls --without-included-gettext
Thread model: posix
gcc version 3.2.1



*  sys-devel/binutils
     Latest version installed: 2.13.90.0.4



celeborn root # emerge info
Portage 2.0.45-r3 (default-ppc-1.4, gcc-3.2.1, glibc-2.2.5-r7)
=================================================================
System uname: 2.4.20-rc4-ben0 ppc
USE="oss dvd xv jpeg mitshm gif gnome motif png truetype ppc gnome-libs gdbm
berkdb slang readline java guile mysql X sdl gpm tcpd pam libwww ssl perl
python esd imlib oggvorbis gtk kde opengl mozilla cdr apm cups slp dga fbcon
directfb qt qtmt arts aalib nls ncurses mpeg quicktime xmms ipv6 spell xml
pdflib tetex samba"
ARCH="ppc"
COMPILER="gcc3"
CHOST="powerpc-unknown-linux-gnu"
CFLAGS="-O3 -pipe -mcpu=750 -mpowerpc-gfxopt -fsigned-char"
CXXFLAGS="-O3 -pipe -mcpu=750 -mpowerpc-gfxopt -fsigned-char"
ACCEPT_KEYWORDS="ppc ~ppc"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config
/usr/kde/3/share/config:/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
MAKEOPTS="-j2"
JDK_HOME="/opt/blackdown-jdk-1.3.1"
JAVA_HOME="/opt/blackdown-jdk-1.3.1"



And a sample configuration line, that causes the segfault:

macro index     ,f      "l(~f angelfire.com | ~f aol.com | ~f bigfoot.com | ~f
candseek.com | ~f clinet.fi | ~f earthlink.net | ~f excite.com | ~f
geocities.com | ~f hotbot.com | ~f hotmail.com | ~f iname.com | ~f
inter-host.net | ~f juno.com | | ~f mail.com | ~f mindspring.com | ~f msn.com |
~f netcom.com | ~f prodigy.net | ~f usa.net | ~f writeme.com | ~f yahoo.com)"
"Spam-Filter"
Comment 5 Khayyam 2002-12-19 11:00:46 UTC
Thank you for the additional info. This may be a ppc issue as i also had
segfaults and had rebuilt with less aggressive CFLAGS and, as you also found,
the problem disapeared. I've had no reports of this from x86/sparc etc and
i think it's fairly safe to say that this is confined to ppc. I intend to
adjust the .ebuild to adjust CFLAGS (based on an arch).

My suspicion is that the bug appeared with a glibc update as i only noticed
only noticed post glibc-2.3.1. Could you send me the output of `qpkg -I -v
glibc`?

Thanks again for reporting this, 
Comment 6 Lars Weiler (RETIRED) gentoo-dev 2002-12-20 06:25:11 UTC
Maybe you're right.  The output of qpkg is

sys-libs/glibc-2.3.1-r2 *

And I can't remember that I ever had a version older than 2.3.x on my system.
Comment 7 Lars Weiler (RETIRED) gentoo-dev 2003-03-08 01:18:00 UTC
After a lot of changes to gcc, glibc etc. I tried compiling mutt again with -O3.  There is still the same error.

In the attachment is an ebuild that will replace the -O[3-9] flag to -O2 for ppc-architectures.  Additionally there is a patch for editing threads (Bug #12165) included.


My current emerge info:

Portage 2.0.47-r8 (default-ppc-1.4, gcc-3.2.2, glibc-2.3.1-r2)
=================================================================
System uname: 2.4.20-ben8 ppc
GENTOO_MIRRORS=" http://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://gentoo.linux.no/pub/gentoo/"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY="/usr/local/portage"
USE="oss dvd xv jpeg nls gif kde png truetype ppc directfb gdbm berkdb slang readline arts tetex aalib tcltk guile mysql X sdl tcpd pam libwww ssl perl python imlib oggvorbis gtk qt motif mozilla cdr apm avi crypt cups dga fbcon ipv6 maildir mpeg ncurses opengl pdflib qtmt quicktime samba slp spell xml xmms -mitshm -gnome -gnome-libs -gpm -esd"
COMPILER="gcc3"
CHOST="powerpc-unknown-linux-gnu"
CFLAGS="-O3 -pipe -mcpu=750"
CXXFLAGS="-O3 -pipe -fsigned-char"
ACCEPT_KEYWORDS="ppc ~ppc"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="ccache"
Comment 8 Lars Weiler (RETIRED) gentoo-dev 2003-03-08 01:21:04 UTC
Created attachment 9124 [details]
ebuild described in comment #7
Comment 9 Lars Weiler (RETIRED) gentoo-dev 2003-03-08 01:26:40 UTC
*** Bug 12165 has been marked as a duplicate of this bug. ***
Comment 10 Lars Weiler (RETIRED) gentoo-dev 2003-03-08 02:08:55 UTC
Another thing for track down the fault.  I found in dmesg the following lines:

Process mutt tried to read below stack
  addr: 7575af44, gpr1: 7fffe080, pc: 0fc9c3a4, lr: 0fd60820
Comment 11 Mark Guertin 2003-03-10 12:02:21 UTC
this looks like CFLAGS issues, lately I have noticed that mcpu=750 is _evil_.  
THere have been (and still are _many_ problms with this optimixation 
selection). 
 
In fact it is getting so bad that I am probably going to remove it from out 
reccomended CFLAGS permanenetly.  now if people actually _updated_ their 
make.conf and looked at it we might have some success with that approach. 
Comment 12 Lars Weiler (RETIRED) gentoo-dev 2003-03-10 15:39:07 UTC
Deleted -mcpu=750 from my CFLAGS and built mutt with -O3.  There's still the segfault on start.
Comment 13 Mark Guertin 2003-03-19 14:01:48 UTC
well, since you reported this bug and are now a dev, i'll toss this one back to you hehe.  I dont know any other ppc devs handy that are using mutt
Comment 14 Lars Weiler (RETIRED) gentoo-dev 2003-03-19 18:22:01 UTC
Created attachment 9620 [details]
ebuild without errors

Alright.  There's now a new ebuild without errors (as lintool says)

I suggest for now to bring this ebuild into portage, in order to change -O3 to
-O2.  Why there's a stack "underflow" I can't tell.  This seems only
ppc-related.
Comment 15 Lars Weiler (RETIRED) gentoo-dev 2003-03-19 18:29:36 UTC
Created attachment 9623 [details]
ebuild without errors

Something went wrong with the last attachment (maybe because I used lynx)
Comment 16 Lars Weiler (RETIRED) gentoo-dev 2003-03-21 23:03:33 UTC
added new ebuild (for version 1.4.1 actually) to CVS