I've been attempting to port nmweb to the new bindings, but I got stuck on a bug that segfaults python. I attached a reduced version that reproduces the problem for me. It uses recent messages from the notmuch list; it others can't reproduce let me know and I will try to make something more self contained including a message set. It's a bit tricky to get ASAN working but I managed with % env ASAN_OPTIONS=alloc_dealloc_mismatch=0 LD_PRELOAD="libasan.so.6 libstdc++.so.6" LD_LIBRARY_PATH=../../lib python3 ~/test.py You can see in the attached output that one of the notmuch messages structs is used after being freed. I suspect it has something to do with the iterator code in the bindings, but I have not examined it in detail.