Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 50AA2429E29 for ; Sat, 18 Jun 2011 03:30:18 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.09 X-Spam-Level: X-Spam-Status: No, score=-0.09 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, T_MIME_NO_TEXT=0.01] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o6PPsYATswdl for ; Sat, 18 Jun 2011 03:30:17 -0700 (PDT) Received: from homiemail-a15.g.dreamhost.com (caiajhbdcagg.dreamhost.com [208.97.132.66]) by olra.theworths.org (Postfix) with ESMTP id 9D7B1431FB6 for ; Sat, 18 Jun 2011 03:30:17 -0700 (PDT) Received: from homiemail-a15.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTP id E006D76C069; Sat, 18 Jun 2011 03:30:16 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=SSpaeth.de; h=from:to:cc:subject :in-reply-to:references:date:message-id:mime-version: content-type; q=dns; s=sspaeth.de; b=mEnNpj6Oopm06XRro6+6ISrmP6n ayF80EZyJUmvDU9DqXgzXfR56BGVldK1BTeLpD1bceTj23GicGzTNT7MakWZ8wcw nToBvOMDIq1gsjslJl4EP851nVQcRWV+X1tC28MgdU2BkqOAWXlnBjUnIXGbYZIo bZBrs5XjZOnSrQYg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=SSpaeth.de; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version: content-type; s=sspaeth.de; bh=tJ/OdZFS3fhe3PruXjqyh1m5PUg=; b=P wOi7LP8KxR450aiV/9q0hlzdN2XgvoVfl7PdrxLjp4l+cflYw4lwR3yFD2RFajjy Ra1xfSZajAEvQvWwucGSkKezEuRPphgnuZjwWU/eRDW2g3RANYEsdnRixDT9BVgy vGE5ztFT0Kf9zLiXH98FCXMSMEWxVsyjR56EkLhxpg= Received: from spaetzbook.sspaeth.de (unknown [62.48.121.245]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: fax@sspaeth.de) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTPSA id C1CA976C065; Sat, 18 Jun 2011 03:30:14 -0700 (PDT) Received: by spaetzbook.sspaeth.de (sSMTP sendmail emulation); Sat, 18 Jun 2011 12:30:10 +0200 From: Sebastian Spaeth To: Patrick Totzke Subject: Re: [python] segfaults at Message.get_date In-Reply-To: <20110617161024.GA8154@optimusprime> References: <20110616215439.GA26997@brick> <87boxxq833.fsf@SSpaeth.de> <20110617161024.GA8154@optimusprime> User-Agent: Notmuch/0.5-233-gb404931 (http://notmuchmail.org) Emacs/23.2.1 (x86_64-pc-linux-gnu) Date: Sat, 18 Jun 2011 12:30:01 +0200 Message-ID: <87hb7n300m.fsf@SSpaeth.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jun 2011 10:30:18 -0000 --=-=-= On Fri, 17 Jun 2011 17:10:24 +0100, Patrick Totzke : > #0 0x006eb87d in Xapian::Document::Internal::get_value(unsigned int) const () from /usr/lib/sse2/libxapian.so.22 > #1 0x006eb952 in Xapian::Document::get_value(unsigned int) const () from /usr/lib/sse2/libxapian.so.22 > #2 0x00523963 in notmuch_message_get_date () from /usr/local/lib/libnotmuch.so.1 One question, what type is libnotmuch really returning here? The code: time_t notmuch_message_get_date (notmuch_message_t *message) { ... return Xapian::sortable_unserialise (value); } But Xapian API says that sortable_unserialise() returns floating type "double" http://xapian.org/docs/apidoc/html/namespaceXapian.html#326fe2d6b0ee59ac9536f3960e8fd99b "Convert a string encoded using sortable_serialise back to a floating point number." But time_t is usually a (signed) long and not floating point. Obviously things have worked just fine so far, but is libnotmuch really returning the right type here? Sorry, I expose my total lack of basic C++ knowledge here... Sebastian --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk38fikACgkQVYX1jMgnoGKItgCdHDom7GmtoOmVAuYqtMVDi9SS yRAAnA1PeP/D+dN/wA508cNubDJ7lZIz =T/nU -----END PGP SIGNATURE----- --=-=-=--