#3703: Running save-message on tagged messages segfaults if message flags 
changed
--------------------------+---------------------
 Reporter:  terminalmage  |      Owner:  brendan
     Type:  defect        |     Status:  new
 Priority:  major         |  Milestone:
Component:  IMAP          |    Version:
 Keywords:                |
--------------------------+---------------------
 This is reproducible both on 1.5.23 and the latest hg revision (as of
 right now, r6347).

 I am running mutt on my Gmail account, using IMAP.

 Steps to reproduce:

 1. View a new message. This will set the status char in the status bar to
 modified (default: *), indicating that the mailbox has unsynced changes.
 2. Tag the message.
 3. Sync the mailbox.
 4. Use tag-prefix and then save the message to another IMAP folder

 The way I am triggering this is by hitting ';' (bound to tag-prefix),
 followed by the pound sign, which kicks off the following macro:

 {{{
 # \043 = pound sign
 macro index,pager \043 "<save-message>=[Gmail]/Trash<enter><refresh><sync-
 mailbox><enter><collapse-all>" "Trash Message"
 }}}


 How reproducible:

 100% of the time, if the above steps are followed:



 Additional info:

 Backtrace:

 {{{
 % gdb /usr/bin/mutt core.974
 GNU gdb (GDB) 7.8
 Copyright (C) 2014 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later
 <http://gnu.org/licenses/gpl.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
 and "show warranty" for details.
 This GDB was configured as "x86_64-unknown-linux-gnu".
 Type "show configuration" for configuration details.
 For bug reporting instructions, please see:
 <http://www.gnu.org/software/gdb/bugs/>.
 Find the GDB manual and other documentation resources online at:
 <http://www.gnu.org/software/gdb/documentation/>.
 For help, type "help".
 Type "apropos word" to search for commands related to "word"...
 Reading symbols from /usr/bin/mutt...done.
 [New LWP 974]

 warning: Could not load shared library symbols for linux-vdso.so.1.
 Do you need "set solib-search-path" or "set sysroot"?
 Core was generated by `mutt -F /home/erik/.muttrc.gmail'.
 Program terminated with signal SIGSEGV, Segmentation fault.
 #0  index_color (index_no=<optimized out>) at curs_main.c:260
 260       return h->pair;
 (gdb) bt
 #0  index_color (index_no=<optimized out>) at curs_main.c:260
 #1  0x000000000043da95 in menu_redraw_index (menu=0x2690230) at menu.c:246
 #2  0x000000000041fc25 in mutt_index_menu () at curs_main.c:623
 #3  0x0000000000408b9f in main (argc=1, argv=<optimized out>) at
 main.c:1053
 (gdb)
 }}}


 I took a look at the source code, and the offending line number in
 curs_main.c is the final line of the below function:

 {{{
 int index_color (int index_no)
 {
   HEADER *h = Context->hdrs[Context->v2r[index_no]];

   if (h && h->pair)
     return h->pair;

   mutt_set_header_color (Context, h);
   return h->pair;
 }
 }}}

 Since it seems to have something to do with the colors, here is my color
 configuration:

 {{{
 color   indicator       brightwhite red
 color   status          brightwhite brightblue

 color   hdrdefault      color39 default
 color   header          color45 default ^(From|Subject):

 color   quoted          color243 default
 color   quoted1         color248 default
 color   quoted2         color243 default
 color   quoted3         color248 default
 color   quoted4         color243 default
 color   quoted5         color248 default
 color   quoted6         color243 default
 color   quoted7         color248 default

 color   body            yellow default "[;:]-[)/(|]"
 color   body            yellow default "[;:][)/(|]"
 color   body            green default  "[[:alpha:]]\+://[^ ]*"
 color   body            color39 default "(ftp|http|https)://[^ ]+"   #
 point out URLs
 color   body            color39 default [-a-z_0-9.]+@[-a-z_0-9.]+    #
 e-mail addresses

 color   index           color39 default ~N
 color   index           color39 default ~O
 color   index           color46 default ~T
 color   index           color247 default ~v
 color   index           color196 default ~F

 color   tree            color39 default
 color   attachment      color196 default
 color   message         color39 default
 color   signature       color39 default
 color   error           color160 default
 color   search          black color111
 color   underline       brightgreen default
 }}}

 Please let me know if there is any additional information that I can
 provide.

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/3703>
Mutt <http://www.mutt.org/>
The Mutt mail user agent

Reply via email to