Can you help me maybe? I don't see the bug.

QUOTA=maildir QUOTA_RULE='*:storage=100M' MAIL_PLUGINS="antispam quota" 
MAIL_PLUGIN_DIR=/home/johannes/Projects/dovecot/antispam gdb --args 
/home/johannes/Projects/dovecot/dovecot-1.1/src/imap/imap
GNU gdb 6.8-debian
Copyright (C) 2008 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 "powerpc-linux-gnu"...
(gdb) run
Starting program: /home/johannes/Projects/dovecot/dovecot-1.1/src/imap/imap 
* PREAUTH [CAPABILITY IMAP4rev1 SASL-IR SORT THREAD=REFERENCES MULTIAPPEND 
UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS UIDPLUS LIST-EXTENDED 
I18NLEVEL=1] Logged in as johannes
01 select SPAM
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags 
permitted.
* 8 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1212140311] UIDs valid
* OK [UIDNEXT 9] Predicted next UID
01 OK [READ-WRITE] Select completed.
A003 APPEND SPAM () {2}
+ OK
ab

Program received signal SIGSEGV, Segmentation fault.
0x100929f4 in mail_get_physical_size (mail=0x0, size_r=0xbfeaf030) at mail.c:100
100             return p->v.get_physical_size(mail, size_r);
(gdb) bt
#0  0x100929f4 in mail_get_physical_size (mail=0x0, size_r=0xbfeaf030) at 
mail.c:100
#1  0x0fe29be0 in quota_try_alloc (ctx=0x101707a8, mail=0x0, 
too_large_r=0xbfeaf060)
    at quota.c:818
#2  0x0fe303dc in quota_check (t=0x10170158, mail=0x0) at quota-storage.c:148
#3  0x0fe30968 in quota_save_finish (ctx=0x10177c10) at quota-storage.c:251
#4  0x0fdfec58 in antispam_save_finish (ctx=0x10177c10) at 
antispam-storage-1.1.c:178
#5  0x10097c94 in mailbox_save_finish (_ctx=0x10159004) at mail-storage.c:738
#6  0x10016988 in cmd_append_continue_message (cmd=0x10158f98) at 
cmd-append.c:408
#7  0x10015804 in client_input_append (cmd=0x10158f98) at cmd-append.c:79
#8  0x101029e0 in io_loop_handler_run (ioloop=0x10154aa8) at ioloop-epoll.c:201
#9  0x10101514 in io_loop_run (ioloop=0x10154aa8) at ioloop.c:308
#10 0x1003094c in main (argc=1, argv=0xbfeaf4b4, envp=0xbfeaf4bc) at main.c:293

I'll keep digging but I don't see why 

        return quota_check(ctx->transaction, ctx->dest_mail != NULL ?
                           ctx->dest_mail : qt->tmp_mail);

should pass NULL in the second argument.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to