On Wed, 2008-10-15 at 08:35 +0200, Andre Hübner wrote: > Hi, > > > oops, sorry, I meant actually: > > > fr 6 > > p *stream.parent > > p *stream.parent.real_stream > > No, problem. i have enough cores ;)
So it happens regularly? Can you reproduce it? I can't really see how it's crashing. Could you apply the attached patch, and also compile the lib/*.c and lib-mail/istream-header-filter.c without -O2 so the backtrace will be more usable? (I usually do it by removing -O2 from the subdirs' Makefile and then make clean + make in those subdirs.)
diff -r c9e9cf2ad4c9 src/lib/istream-limit.c
--- a/src/lib/istream-limit.c Thu Oct 16 15:19:42 2008 +0300
+++ b/src/lib/istream-limit.c Thu Oct 16 15:48:08 2008 +0300
@@ -38,8 +38,8 @@
{
struct limit_istream *lstream = (struct limit_istream *) stream;
uoff_t left;
- ssize_t ret;
- size_t pos;
+ ssize_t ret, ret2;
+ size_t pos, orig_pos;
if (stream->istream.v_offset +
(stream->pos - stream->skip) >= lstream->v_size) {
@@ -55,6 +55,7 @@
}
stream->buffer = i_stream_get_data(stream->parent, &pos);
+ orig_pos = pos;
if (pos <= stream->pos) {
if ((ret = i_stream_read(stream->parent)) == -2)
return -2;
@@ -77,12 +78,12 @@
}
}
- ret = pos > stream->pos ? (ssize_t)(pos - stream->pos) :
+ ret2 = pos > stream->pos ? (ssize_t)(pos - stream->pos) :
(ret == 0 ? 0 : -1);
- stream->pos = pos;
i_assert(ret != -1 || stream->istream.eof ||
stream->istream.stream_errno != 0);
- return ret;
+ stream->pos = pos;
+ return ret2;
}
static void i_stream_limit_seek(struct istream_private *stream, uoff_t v_offset,
signature.asc
Description: This is a digitally signed message part
