<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/test, branch debian/0.34.1-1</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=debian%2F0.34.1-1</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=debian%2F0.34.1-1'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2021-10-30T16:51:50Z</updated>
<entry>
<title>lib/load_config: deallocate / NULL database on fatal error</title>
<updated>2021-10-30T16:51:50Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-23T13:22:38Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=fe51c275fcd7107d92b40de511086300ba4060ed'/>
<id>urn:sha1:fe51c275fcd7107d92b40de511086300ba4060ed</id>
<content type='text'>
This fixes a potential memory leak, and makes the behaviour of
notmuch_database_load_config (somewhat) consistent with
n_d_{open,create} with config.
</content>
</entry>
<entry>
<title>lib/load_config: document expectations for db on error, add tests</title>
<updated>2021-10-30T16:49:37Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-23T13:22:37Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=8f0b84789d4fda0182e073b68b73160c9b94a4b7'/>
<id>urn:sha1:8f0b84789d4fda0182e073b68b73160c9b94a4b7</id>
<content type='text'>
This is a bit different than n_d_{open,create}_with_config, since
there are several non-zero status codes where we do want to return a
non-NULL database structure.
</content>
</entry>
<entry>
<title>lib/create: fix memory leak, ensure *database=NULL on error</title>
<updated>2021-10-30T16:47:47Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-23T13:22:36Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=2ba50b52302dce08068843e0029f9ee935a0d7f3'/>
<id>urn:sha1:2ba50b52302dce08068843e0029f9ee935a0d7f3</id>
<content type='text'>
This code previously relied on _finish_open to free the notmuch struct
on errors (except for the case of database == NULL, which was a
potential double free). When we removed those frees from _finish_open,
we introduced a (small) memory leak.

In this commit, fix the memory leak, and harmonize the on-error
behaviour with n_d_open_with_config.
</content>
</entry>
<entry>
<title>lib/create: document expectations for db on error, add tests</title>
<updated>2021-10-30T16:45:40Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-23T13:22:35Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=f3fcdd2ddac2384c0c1daeffa495ad3ec01bc1af'/>
<id>urn:sha1:f3fcdd2ddac2384c0c1daeffa495ad3ec01bc1af</id>
<content type='text'>
It seems sensible to harmonize the behaviour with
n_d_open_with_config. In this commit we just assert the desired
behaviour.
</content>
</entry>
<entry>
<title>lib/open: fix potential double-free, ensure *database=NULL on error</title>
<updated>2021-10-30T16:43:58Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-23T13:22:34Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=74c4ce6d88bcc643424c5d89cc8d30cd835e46c3'/>
<id>urn:sha1:74c4ce6d88bcc643424c5d89cc8d30cd835e46c3</id>
<content type='text'>
During refactoring for 0.32, the code that set notmuch=NULL on various
errors was moved into _finish_open. This meant that the the code which
relied on that to set *database to NULL on error was no longer
correct. It also introduced a potential double free, since the notmuch
struct was deallocated inside _finish_open (via n_d_destroy).

In this commit we revert to "allocator frees", and leave any cleanup
to the caller of _finish_open. This allows us to get back the
behaviour of setting *database to NULL with a small change. Other
callers of _finish_open will need free notmuch on errors.
</content>
</entry>
<entry>
<title>test: add two known broken tests for missing config files</title>
<updated>2021-10-30T16:42:16Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-23T13:22:33Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=a942cb8ee3f0e20d6cd72d25c432467a5ebfe93c'/>
<id>urn:sha1:a942cb8ee3f0e20d6cd72d25c432467a5ebfe93c</id>
<content type='text'>
The documentation claims that the database will be set to NULL in this
case, but it is currently not happening. Based on a reproducer [1]
from Austin Ray.

[1]: id:20211021190401.imirxau2ewke6e2m@athena
</content>
</entry>
<entry>
<title>test/libconfig: use 'export' when restoring NOTMUCH_CONFIG</title>
<updated>2021-10-28T01:05:45Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-27T13:20:40Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e2b842afb1dff0621f30f50edb21a8e254b51f6e'/>
<id>urn:sha1:e2b842afb1dff0621f30f50edb21a8e254b51f6e</id>
<content type='text'>
This is required when NOTMUCH_CONFIG has been unset, and is harmless
otherwise.
</content>
</entry>
<entry>
<title>Merge tag '0.33.2'</title>
<updated>2021-09-30T11:58:48Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-09-30T11:58:48Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=3e2e724d53a1dce3ba00a20c71b2e6f735678136'/>
<id>urn:sha1:3e2e724d53a1dce3ba00a20c71b2e6f735678136</id>
<content type='text'>
notmuch 0.33.2 release
</content>
</entry>
<entry>
<title>test/T355-smime: Use key as exported by gpgsm</title>
<updated>2021-09-29T23:04:31Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-09-28T01:30:08Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=4760b4470c5d5782e52bd1a7761d9975a1db1fec'/>
<id>urn:sha1:4760b4470c5d5782e52bd1a7761d9975a1db1fec</id>
<content type='text'>
As reported in id:87h7pxiek3.fsf@tethera.net, the previous version of
the test is flaky. There is some so-far undebugged interaction between
openssl and gpgsm that causes the keys to fail to import. As a
potential workaround, use the key as exported by gpgsm, and eliminate
openssl from this particular pipeline.
</content>
</entry>
<entry>
<title>test/emacs: tests for notmuch-{tree,unthreaded} with bad CWD</title>
<updated>2021-09-11T14:11:29Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-08-29T19:23:35Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=21e365f51a7ff17e5154cf06396aeafe3f7d9bd7'/>
<id>urn:sha1:21e365f51a7ff17e5154cf06396aeafe3f7d9bd7</id>
<content type='text'>
These work thanks to the previous wrapping of process creation
primitives.
</content>
</entry>
</feed>
