notmuch/lib
David Bremner 582e919e27 lib/config: don't set destructor until iterator is initialized.
As diagnosed by Olivier Taïbi in
id:20201027100916.emry3k2wujod4xnl@galois.lan, if an exception is
thrown while the initialization is happening (e.g. if the function is
called on a closed database), then the destructor is (sometimes)
invoked on an uninitialized Xapian object.

Solve the problem by moving the setting of the destructor until after
the placement new successfully completes. It is conceivable this might
cause a memory leak, but that seems preferable to crashing, and in any
case, there seems to be nothing better to be done if the
initialization is failing things are in an undefined state by
definition.
2020-10-29 21:13:01 -03:00
..
add-message.cc lib: replace use of static_cast for writable databases 2020-07-28 08:47:58 -03:00
built-with.c
config.cc lib/config: don't set destructor until iterator is initialized. 2020-10-29 21:13:01 -03:00
database-private.h lib: replace use of static_cast for writable databases 2020-07-28 08:47:58 -03:00
database.cc lib: replace use of static_cast for writable databases 2020-07-28 08:47:58 -03:00
directory.cc lib: fix return value for n_directory_delete 2020-08-03 20:59:06 -03:00
filenames.c
index.cc
indexopts.c lib: return NULL from n_d_get_default_indexopts on error 2020-08-03 20:45:58 -03:00
Makefile
Makefile.local emacs: Use makefile-gmake-mode in Makefile*s 2020-08-09 21:14:36 -03:00
message-file.c
message-id.c
message-private.h
message-property.cc
message.cc lib: replace use of static_cast for writable databases 2020-07-28 08:47:58 -03:00
messages.c
notmuch-private.h
notmuch.h Fix typos 2020-08-09 21:14:36 -03:00
notmuch.sym
parse-time-vrp.cc
parse-time-vrp.h
query-fp.cc
query-fp.h
query.cc
regexp-fields.cc
regexp-fields.h
sha1.c
string-list.c
string-map.c
tags.c
thread-fp.cc
thread-fp.h
thread.cc