Hi,
I've found a problem with mix folders, where an EXPUNGE cause a core dump.

(This has also been posted on comp.mail.imap in similar form.)

System: Solaris 10 x64, built with Sun Studio Compiler 12, OpenCSW SSL libraries, SSLTYPE=none, CREATEPROTO=mixproto, and mailsubdir=".MailDir".

sh-3.00$ imapd
* PREAUTH [CAPABILITY IMAP4REV1 I18NLEVEL=1 LITERAL+ IDLE UIDPLUS NAMESPACE CHILDREN MAILBOX-REFERRALS BINARY UNSELECT ESEARCH WITHIN SCAN SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND] Pre-authenticated user grs paranoia.mcleod-schmidt.id.au IMAP4rev1 2007e.404 at Fri, 15 May 2009 01:53:21 +1000 (EST)
1 select me2
* 61 EXISTS
* 4 RECENT
* OK [UIDVALIDITY 1240838034] UID validity status
* OK [UIDNEXT 176] Predicted next UID
* FLAGS (NonJunk \Answered \Flagged \Deleted \Draft \Seen)
* OK [PERMANENTFLAGS (NonJunk \* \Answered \Flagged \Deleted \Draft \Seen)] Permanent flags
* OK [UNSEEN 12] first unseen message in /home/grs/.MailDir/me2
1 OK [READ-WRITE] SELECT completed
2 expunge
Segmentation Fault (core dumped)
sh-3.00$ file core
core:        ELF 32-bit LSB core file 80386 Version 1, from 'imapd'
sh-3.00$ dbx /opt/local/sbin/imapd core
Reading imapd
core file header read successfully
Reading ld.so.1
Reading libsocket.so.1
Reading libnsl.so.1
Reading libgen.so.1
Reading libc.so.1
program terminated by signal SEGV (no mapping at the fault address)
0xfede4d01: realfree+0x0043:    movl     (%ecx),%eax
Current function is fs_get (optimized)
   38     void *block = malloc (size ? size : (size_t) 1);
(dbx 1) where
  [1] realfree(0x8173060), at 0xfede4d01
  [2] cleanfree(0x0), at 0xfede531f
[3] _malloc_unlocked(0x18, 0xfefa40b8, 0x8073620, 0x0, 0x8046a68, 0x806c804), at 0xfede483b
  [4] malloc(0x18, 0x0, 0x0, 0x80d867e), at 0xfede4764
=>[5] fs_get(size = ???) (optimized), at 0x806c804 (line ~38) in "fs_unix.c"
[6] Scandir(dirname = ???, namelist = ???, select = ???, compar = ???) (optimized), at 0x8078201 (line ~53) in "scandir.c" [7] mix_expunge(stream = ???, sequence = ???, options = ???) (optimized), at 0x80d8213 (line ~1054) in "mix.c" [8] mail_expunge_full(stream = ???, sequence = ???, options = ???) (optimized), at 0x807eb71 (line ~2507) in "mail.c" [9] main(argc = ???, argv = ???) (optimized), at 0x8061b32 (line ~660) in "imapd.c"
(dbx 2) q
sh-3.00$

The problem seems to be with Scandir(), and removing from the equation and using the system-supplied version fixes this problem, but I am not confident that I haven't created another problem somewhere.

Is there an IMAP test suite that doesn't cost 15K somewhere?

        Cheers,
                Gary    B-)
_______________________________________________
Imap-uw mailing list
[email protected]
http://mailman2.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to