--- /dev/null
+Return-Path: <notmuchmail_org@campese.de>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 9A05F431FAF\r
+ for <notmuch@notmuchmail.org>; Sat, 21 Mar 2015 04:32:15 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 2.438\r
+X-Spam-Level: **\r
+X-Spam-Status: No, score=2.438 tagged_above=-999 required=5\r
+ tests=[DNS_FROM_AHBL_RHSBL=2.438] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id sh1b-Jzufgom for <notmuch@notmuchmail.org>;\r
+ Sat, 21 Mar 2015 04:32:12 -0700 (PDT)\r
+X-Greylist: delayed 485 seconds by postgrey-1.32 at olra;\r
+ Sat, 21 Mar 2015 04:32:12 PDT\r
+Received: from mail.worldserver.net (mail.worldserver.net [217.13.200.38])\r
+ (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 2B58C431FAE\r
+ for <notmuch@notmuchmail.org>; Sat, 21 Mar 2015 04:32:12 -0700 (PDT)\r
+Received: from mailer.rman (unknown [46.165.219.132])\r
+ (Authenticated sender: mailer@campese.de)\r
+ by mail.worldserver.net (Postfix) with ESMTPSA id B4776300332;\r
+ Sat, 21 Mar 2015 12:23:59 +0100 (CET)\r
+From: Simon Campese <notmuchmail_org@campese.de>\r
+To: notmuch@notmuchmail.org\r
+Cc: \r
+Subject: [BUG] notmuch crashes on FreeBSD when synchronize_flags=true\r
+Date: Sat, 21 Mar 2015 12:23:58 +0100\r
+Message-ID: <86619utwz5.fsf@tu-dortmund.de>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-Mailman-Approved-At: Sat, 21 Mar 2015 05:10:26 -0700\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 21 Mar 2015 11:32:15 -0000\r
+\r
+Hello,\r
+\r
+I'm trying to setup notmuch on my FreeBSD machine (version 10.1). As\r
+soon as I run 'notmuch new' (without an existing .notmuch directory),\r
+notmuch crashes with the error message 'abort (core dumped) notmuch\r
+new'. An example output is: \r
+\r
+--- BEGIN shell-output ---\r
+\r
+freebsd-desk% notmuch new\r
+Found 50363 total files (that's not much mail).\r
+zsh: abort (core dumped) notmuch new\r
+freebsd-desk%\r
+\r
+--- END shell-output ---\r
+\r
+If I put 'synchronize_flags=false' into my config, 'notmuch new' works fine and\r
+indexes everything. Here's a backtrace from gdb:\r
+\r
+--- BEGIN gdb-session ---\r
+\r
+bsd-desk% gdb notmuch\r
+GNU gdb 6.1.1 [FreeBSD]\r
+Copyright 2004 Free Software Foundation, Inc.\r
+GDB is free software, covered by the GNU General Public License, and you are\r
+welcome to change it and/or distribute copies of it under certain conditions.\r
+Type "show copying" to see the conditions.\r
+There is absolutely no warranty for GDB. Type "show warranty" for details.\r
+This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)...\r
+(gdb) run new\r
+Starting program: /usr/local/bin/notmuch new\r
+(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[New LWP 101945]\r
+(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[New Thread 804406400 (LWP 101945/notmuch)]\r
+(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debuggingFound 50363 total files (that's not much mail).\r
+Program received signal SIGABRT, Aborted.\r
+[Switching to Thread 804406400 (LWP 101945/notmuch)]\r
+0x00000008018d16ca in thr_kill () from /lib/libc.so.7\r
+(gdb) bt\r
+#0 0x00000008018d16ca in thr_kill () from /lib/libc.so.7\r
+#1 0x00000008019a6149 in abort () from /lib/libc.so.7\r
+#2 0x00000008022df42d in __cxa_rethrow () from /lib/libcxxrt.so.1\r
+#3 0x0000000801c5a7e6 in Xapian::Document::Internal::remove_term () from /usr/local/lib/libxapian.so.22\r
+#4 0x000000080084dd1c in notmuch_message_get_replies () from /usr/local/lib/libnotmuch.so.3\r
+#5 0x000000080084f0cf in notmuch_message_remove_tag () from /usr/local/lib/libnotmuch.so.3\r
+#6 0x000000080084f2d5 in notmuch_message_maildir_flags_to_tags () from /usr/local/lib/libnotmuch.so.3\r
+#7 0x000000000040d3e5 in ?? ()\r
+#8 0x000000000040ce48 in ?? ()\r
+#9 0x000000000040ce48 in ?? ()\r
+#10 0x000000000040ce48 in ?? ()\r
+#11 0x000000000040c26b in ?? ()\r
+#12 0x000000000040878b in ?? ()\r
+#13 0x000000000040798f in ?? ()\r
+#14 0x000000080063b000 in ?? ()\r
+#15 0x0000000000000000 in ?? ()\r
+(gdb)\r
+\r
+--- END gdb-session ---\r
+\r
+The error described above occurs, no matter if I install the notmuch\r
+package (and its dependencies) via binary packages or build from\r
+ports. I've tried version 0.18 and version 0.19. Also, it doesn't \r
+matter if I start with a maildir containing just a single mail, or my\r
+real maildir with thousands of messages.\r
+\r
+On my linux box (running the same verions of notmuch and its\r
+dependencies), the error doesn't occur, so I guess it has something to\r
+do with the different C++-Stacks (libcxxrt is FreeBSD's ABI library).\r
+A quick glance at the notmuch code showed that\r
+notmuch_message_get_replies() sometimes returns NULL. I'm not a C++\r
+expert but could it be that this might be the problem here?\r
+\r
+To give you some version numbers, this is what's currently installed:\r
+\r
+notmuch: 0.19\r
+xapian-core: 1.2.20\r
+gmime: 2.6.20\r
+talloc: 2.1.1\r
+\r
+To reproduce the error, you can do the following:\r
+\r
+- perform a fresh install of FreeBSD\r
+- install the package or port, for example: 'pkg install notmuch'\r
+- create a standard config file containing 'synchronize_flags=true' and\r
+ pointing to some maildir\r
+- run 'notmuch new' \r
+\r
+I would be very thankful for a fix (or hints what might be the problem). \r
+\r
+\r
+Thanks for your help,\r
+\r
+Simon\r