> Hum, it seems *all* iterators are destroyed too early? I think it is > just luck that this works for threads, also the 2nd for loop in the > above code seems like just luck. Yes — looks like the memory management doesn't necessarily free everything immediately; that's what must be causing it to work sometimes. > (FWIW I get a SIGABRT instead of SIGSEGV from these.) Ah, you must be on a Mac :) > Try removing the `self.destroy()` line from > `_base.NotmuchIter.__next__()`. I'm not sure why that destroy was ever > there, I think it is a bug to call free on the iterator so early. Done that; seems to work now. > I can do a proper patch in the next few days probably if no one beats me > to it. Patch attached — I removed a similarly troublesome _destroy() in another place and added unit tests to check this. FWIW, I wasn't able to get it to segfault with the threads or properties iterator, even though it should. I suspect notmuch's memory management; added the tests just in case. Cheers, Lars
_______________________________________________ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-leave@notmuchmail.org