The test mentioned in the subject triggers a segfault. This is with
xapian-core-1.4.16 on OpenBSD. Here is the backtrace:
#0 0x05c9d491bec2 in Xapian::TermIterator::decref() () from
/usr/local/lib/libxapian.so.5.1
#1 0x05c948827062 in Xapian::TermIterator::~TermIterator
(this=0x5c9d2fdb068) at /usr/local/include/xapian/termiterator.h:85
#2 _notmuch_config_list_destroy (list=) at lib/config.cc:38
#3 0x05c97e08050a in ?? () from /usr/local/lib/libtalloc.so.1.1
#4 0x05c94882700f in notmuch_database_get_config_list
(notmuch=0x5c9cb714e60, prefix=, out=0x7f7c98e8) at
lib/config.cc:137
#5 0x05c6ff617c37 in main (argc=2, argv=0x7f7c9998) at test2.c:16
For convenience, here is test2.c:
<- begin test2.c ->
#include
#include
#include
int main (int argc, char** argv)
{
notmuch_database_t *db;
char *val;
notmuch_status_t stat;
EXPECT0(notmuch_database_open (argv[1], NOTMUCH_DATABASE_MODE_READ_WRITE,
&db));
{
notmuch_config_list_t *list;
EXPECT0(notmuch_database_close (db));
stat = notmuch_database_get_config_list (db, "nonexistent", &list);
printf("%d\n", stat == NOTMUCH_STATUS_XAPIAN_EXCEPTION);
}
EXPECT0(notmuch_database_destroy(db));
}
<- end test2.c ->
In frame 4, we see that the iterator was not initialized:
(gdb) p *list
$7 = {notmuch = 0x5c9cb714e60, iterator = {internal = 0xdfdfdfdfdfdfdfdf},
current_key = 0x0, current_val = 0x0}
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org