On Thu, 2009-03-19 at 15:25 -0400, David Halik wrote: > So far > everything is working smoothly, but when someone does a search through > directory with a large number of emails, dovecot dies and prints the > following message: > > [ID 107833 mail.crit] Panic: Trying to allocate 2147483648 bytes
So you can easily reproduce this? > I grabbed a backtrace if it is helpful: Yes, very helpful! Is it possible to also examine variable values? Could you try applying this patch: http://hg.dovecot.org/dovecot-1.1/rev/98a59fd61d7f and also the attached patch. What error does it fail in?
diff -r cde92fa2bc37 src/lib-charset/charset-iconv.c --- a/src/lib-charset/charset-iconv.c Wed Mar 18 20:01:34 2009 -0400 +++ b/src/lib-charset/charset-iconv.c Thu Mar 19 17:10:32 2009 -0400 @@ -144,6 +144,8 @@ /* force buffer to grow */ used = dest->used; + i_assert(used < 1000000); + i_assert(buffer_get_size(dest) >= used); size = buffer_get_size(dest) - used + 1; (void)buffer_append_space_unsafe(dest, size); buffer_set_used_size(dest, used);
signature.asc
Description: This is a digitally signed message part