unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Carl Worth <cworth@cworth.org>
To: Adrian Perez de Castro <aperez@igalia.com>, notmuch@notmuchmail.org
Subject: Re: Segfault searching for tags
Date: Sat, 21 Nov 2009 01:32:34 +0100	[thread overview]
Message-ID: <87tywo3efx.fsf@yoom.home.cworth.org> (raw)
In-Reply-To: <20091120200300.55ba8736@hikari>

On Fri, 20 Nov 2009 20:03:00 +0100, Adrian Perez de Castro <aperez@igalia.com> wrote:
> Well, of course you are right, it is an overloaded operator, which
> (unfortunately, IMHO) looks like a pointer dereference. That is exactly
> one of the things that I find more confusing about C++: it has features
> like operator overloading which look cool initially, but that in the end
> imply more complexity than needed. I can understand why you decided to
> wrap Xapian with a plain C API :)

I'm glad you agree.

Though I should mention that I earned my summer's salary during an
internship once by solving a performance problem that had dodged the
engineers on the project, (since they overlooked an overloaded array
subscript operator on a std::string class as something that could be
expensive---profiling made it obvious, and a temporary copy to a real
array with a real subscript fixed the bug).

So I can't say that operator overloading never helped me. But I know I
left that internship determined not to use it myself.

> I can confirm that this patch avoids the segfault in my case, too. Thanks
> a lot for the quick fix.

Excellent. I'm glad to hear it worked for you.

I'm sorry that the bug was there, since this was a regression that's
come back once or twice now. The project is overdue for a test suite
already...

-Carl

      reply	other threads:[~2009-11-21  0:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-18 18:00 Segfault searching for tags Jeffrey Ollie
2009-11-19 15:45 ` Adrian Perez de Castro
2009-11-20  2:23   ` Jeffrey Ollie
2009-11-20 11:32     ` Carl Worth
2009-11-20 13:10       ` Jeffrey Ollie
2009-11-20 13:20         ` Jan Janak
2009-11-20 17:02           ` Carl Worth
2009-11-20 19:03       ` Adrian Perez de Castro
2009-11-21  0:32         ` Carl Worth [this message]

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=87tywo3efx.fsf@yoom.home.cworth.org \
    --to=cworth@cworth.org \
    --cc=aperez@igalia.com \
    --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).