[dovecot/core | refs/heads/master] 38cd5a08: lib: test-istream-seekable - Add asserts to make sure blocking state changes at EOF

noreply at dovecot.org noreply at dovecot.org
Tue Feb 19 17:03:07 EET 2019


  Branch: refs/heads/master
  Home:   https://github.com/dovecot/core
  Commit: 38cd5a08d8631cfffd93a5534224b43a176e2e5e
      https://github.com/dovecot/core/commit/38cd5a08d8631cfffd93a5534224b43a176e2e5e
  Author: Timo Sirainen <timo.sirainen at open-xchange.com>
  Date:   2019-02-19 (Tue, 19 Feb 2019)

  Changed paths:
    M src/lib/test-istream-seekable.c

  Log Message:
  -----------
  lib: test-istream-seekable - Add asserts to make sure blocking state changes at EOF

  Commit: 4625ceb78226ad7dff248f55bcf1eb843fac9ec2
      https://github.com/dovecot/core/commit/4625ceb78226ad7dff248f55bcf1eb843fac9ec2
  Author: Timo Sirainen <timo.sirainen at open-xchange.com>
  Date:   2019-02-19 (Tue, 19 Feb 2019)

  Changed paths:
    M src/lib-storage/mail.c

  Log Message:
  -----------
  lib-storage: mail_get_*stream*() - Assert that returned streams are blocking

Several callers already rely on them being blocking. Making these asserts
explicit makes sure that any bugs are caught early.

  Commit: 1372692923ad0cef8e0671be9664644ddf61ba75
      https://github.com/dovecot/core/commit/1372692923ad0cef8e0671be9664644ddf61ba75
  Author: Timo Sirainen <timo.sirainen at open-xchange.com>
  Date:   2019-02-19 (Tue, 19 Feb 2019)

  Changed paths:
    M src/lib/istream-seekable.c

  Log Message:
  -----------
  lib: istream-seekable - Change stream to be blocking=TRUE after reaching EOF

After EOF is reached, the stream is now fully read into file or memory.
read()s can no longer return 0, so blocking=TRUE can be used.

Some callers were reusing the seekable stream in places that required
blocking=TRUE.

Fixes at least with imapsieve vnd.dovecot report extension:
Panic: file ostream.c: line 427 (o_stream_nsend_istream): assertion failed: (instream->blocking)

  Patch: https://github.com/dovecot/core/compare/2b3c73e3ab65...38cd5a08d863.patch


More information about the dovecot-cvs mailing list