<<< Date Index >>>     <<< Thread Index >>>

Re: mutt is crashing with segfault when running a macro



On Mon, Sep 6, 2010 at 3:42 PM, Asif Iqbal <vadud3@xxxxxxxxx> wrote:
> On Mon, Sep 6, 2010 at 3:01 PM, Asif Iqbal <vadud3@xxxxxxxxx> wrote:
>> When I run the following macro mutt exits with segfault
>>
>> macro index S 
>> '<pipe-message>/home/axisys/.mutt/script/reportspam.sh<enter><delete-message>'
>>
>> Here is the script
>>
>> #!/bin/bash
>> # take the email and send it as attachment to abuse
>> # save to tmp file
>> spam=$(tempfile -s .eml)
>> ABUSE=abuse@xxxxxxxxxxx
>>
>> cat > "$spam"
>>
>> # use formail to extract subject (could use grep in a pinch)
>> subj=$(formail -x subject < $spam)
>>
>> if [ ! -z "$spam" ]; then
>>        mutt -e 'set from=user@xxxxxxxxxxx' -s "[spam]$subj" -a $spam
>> -- "$ABUSE"
>> fi
>> rm "$spam"
>>
>>
>> Here is the segfault in `dmesg'
>>
>> http://pastebin.com/29JuFUCv
>>
>> I am running mutt 1.5.20 on ubuntu lucid
>>
>> If I add `set -x' in that macro script this is how it reports about the 
>> segfault
>>
>> ++ tempfile -s .eml
>> + spam=/tmp/fileMWDTFO.eml
>> + ABUSE=abuse@xxxxxxxxxxx
>> + cat -
>> Segmentation fault
>> ++ formail -x subject
>> + subj=
>> + '[' '!' -z /tmp/fileMWDTFO.eml ']'
>> + mutt -e 'set from=user@xxxxxxxxxxx' -s '[spam]' -a
>> /tmp/fileMWDTFO.eml -- abuse@xxxxxxxxxxx
>> + rm /tmp/fileMWDTFO.eml
>>
>> Am I hitting a bug? Is there a way to run mutt in debug mode to get more 
>> details
>
> Thanks to rudy_s in #mutt..  I needed to install the mutt-dbg pkg for
> ubuntu. now I have core
> files. Here is the backtrace
>
> Core was generated by `mutt -d5 -F work.muttrc'.
> Program terminated with signal 11, Segmentation fault.
> #0  0x00007f53f7d6835e in vfprintf () from /lib/libc.so.6
> (gdb) bt
> #0  0x00007f53f7d6835e in vfprintf () from /lib/libc.so.6
> #1  0x00007f53f7e1c750 in __vsnprintf_chk () from /lib/libc.so.6
> #2  0x000000000041f9ce in vsnprintf (fmt=0x0) at /usr/include/bits/stdio2.h:78
> #3  mutt_curses_message (fmt=0x0) at ../curs_lib.c:330
> #4  0x000000000041e0c2 in mutt_progress_update
> (progress=0x7fff9846cbd0, pos=0, percent=0)
>    at ../curs_lib.c:439
> #5  0x00000000004a4258 in imap_read_literal (fp=0x1e69550,
> idata=0xde21b0, bytes=2439, pbar=0x7fff9846cbd0)
>    at ../../imap/imap.c:237
> #6  0x00000000004a73bb in imap_fetch_message (msg=0x1e66690,
> ctx=0xded730, msgno=<value optimized out>)
>    at ../../imap/message.c:495
> #7  0x0000000000447935 in mx_open_message (ctx=0xded730, msgno=1) at
> ../mx.c:1503
> #8  0x000000000041da8a in mutt_copy_message (fpout=0x1e66450,
> src=0x7f5300000003, hdr=0x10, flags=-1,
>    chflags=0) at ../copy.c:685
> #9  0x000000000041607c in _mutt_pipe_message (h=0x1e6cd10, cmd=<value
> optimized out>, decode=0,
>    print=<value optimized out>, split=<value optimized out>,
> sep=0xdd5ec0 "\n") at ../commands.c:416
> #10 0x00000000004165ce in mutt_pipe_message (h=0x1e6cd10) at ../commands.c:497
> #11 0x0000000000421aa7 in mutt_index_menu () at ../curs_main.c:2030
> #12 0x000000000043df57 in main (argc=-1740186176, argv=<value
> optimized out>) at ../main.c:1026

problem went away after installing the mutt from hg repo

hg clone http://dev.mutt.org/hg/mutt#HEAD
cd mutt
./prepare (thanks to rudy_s from #mutt for suggesting that)
./configure --enable-imap --enable-debug --with-ssl --enable-hcache

>
>
>>
>> --
>> Asif Iqbal
>> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
>> A: Because it messes up the order in which people normally read text.
>> Q: Why is top-posting such a bad thing?
>>
>
>
>
> --
> Asif Iqbal
> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
>



-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?