[PATCH] test: add known_broken test for dumping large stored queries

David Bremner david at tethera.net
Sun Apr 12 13:39:16 PDT 2020


David Bremner <david at tethera.net> writes:

> 'qsx' reported a bug on #notmuch with notmuch-dump and large stored
> queries. This test will pass (on my machine) if the value of `repeat'
> is made smaller.

I believe the underlying problem is explained by this comment in zlib.h

   The number of uncompressed bytes written is limited to 8191, or
   one less than the buffer size given to gzbuffer().  The caller should assure
   that this limit is not exceeded.  If it is exceeded, then gzprintf() will
   return an error (0) with nothing written.

So calling gzbuffer can increase this limit, but you still have to guess
before writing for the first time.

One way of interpreting this is that we should avoid using gzprintf
where we cannot predict the output size.

d


More information about the notmuch mailing list