unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Justus Winter <4winter@informatik.uni-hamburg.de>,
	notmuch@notmuchmail.org
Subject: Re: [PATCH 2/2] python: annotate all calls into libnotmuch with types
Date: Fri, 24 Jan 2014 21:40:48 -0400	[thread overview]
Message-ID: <87ppngon33.fsf@zancas.localnet> (raw)
In-Reply-To: <20140124163302.2392.83892@thinkbox.jade-hamburg.de>

Justus Winter <4winter@informatik.uni-hamburg.de> writes:

> #0  0x00007f996ad021d5 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
> 56      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
> (gdb) bt
> #0  0x00007f996ad021d5 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
> #1  0x00007f996ad05388 in __GI_abort () at abort.c:90
> #2  0x00007f99699d4486 in talloc_abort (reason=0x7f99699db648 "Bad talloc magic value - access after free") at ../talloc.c:317
> #3  0x00007f99699d8097 in talloc_abort_access_after_free () at ../talloc.c:336

> This is a bit contrived b/c I'm destroying the db object by
> hand. Never the less libnotmuch calls abort, and there is no way to
> contain something like this in the python bindings.

FWIW libnotmuch is not directly calling abort here, talloc is, because
it is detecting illegal memory access patterns. So there could well be a
libnotmuch bug here, but it isn't really related to error handling.

As far as I can tell, the underlying reason for the crash is that that
talloc is a hierarchical memory allocator, and the directory is a child
of the database.  This "ownership" should probably be documented in the
header for notmuch_database_get_directory. This won't fix your crash, of
course ;).

d

  reply	other threads:[~2014-01-25  1:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-09 22:12 [PATCH 1/2] python: add classes to wrap all notmuch_*_t types Justus Winter
2011-10-09 22:12 ` [PATCH 2/2] python: annotate all calls into libnotmuch with types Justus Winter
2011-12-06 10:46   ` Patrick Totzke
2011-12-06 11:12     ` Sebastian Spaeth
2011-12-06 11:44       ` Patrick Totzke
2011-12-06 12:05     ` Sebastian Spaeth
     [not found]       ` <notmuch-sha1-f155d93e11888b35377531dd556b03fd493b7590>
2011-12-07 18:49         ` Justus Winter
     [not found]         ` <notmuch-sha1-c3821ec5e6ef2f83665b03ba10fdfff871f70c2b>
2011-12-07 19:05           ` Justus Winter
2014-01-24 13:17             ` David Bremner
2014-01-24 16:33               ` Justus Winter
2014-01-25  1:40                 ` David Bremner [this message]
2014-01-25  3:07                   ` [PATCH] lib: update documentation for notmuch_database_get_directory David Bremner
2014-01-25 11:46                     ` Tomi Ollila
2014-01-26 14:02                     ` David Bremner
2014-01-24 13:25     ` [PATCH 2/2] python: annotate all calls into libnotmuch with types David Bremner
2011-11-02  7:25 ` [PATCH 1/2] python: add classes to wrap all notmuch_*_t types Sebastian Spaeth
2011-11-28 12:36   ` Justus Winter
2011-12-01 21:25     ` Sebastian Spaeth
2011-12-01 23:32       ` James Westby
2011-12-02 12:35         ` Justus Winter
2011-12-02 14:20           ` James Westby
2011-12-02 23:24             ` James Westby
2011-12-03  2:11               ` Justus Winter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ppngon33.fsf@zancas.localnet \
    --to=david@tethera.net \
    --cc=4winter@informatik.uni-hamburg.de \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).