unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Eliza Velasquez <eliza@eliza.sh>, notmuch@notmuchmail.org
Subject: Re: [bug] possible condition depending on uninitialized value in _notmuch_message_sync
Date: Mon, 16 May 2022 09:01:25 -0300	[thread overview]
Message-ID: <877d6lwusq.fsf@tethera.net> (raw)
In-Reply-To: <87k0aliuen.fsf@eliza.sh>

Eliza Velasquez <eliza@eliza.sh> writes:


> It becomes very clear why this error only happens when removing a
> non-existent tag if you look at at message.cc:1570...
>
> --8<---------------cut here---------------start------------->8---
>     try {
> 	message->doc.remove_term (term);
> 	message->modified = true;
>     } catch (const Xapian::InvalidArgumentError) {
> 	/* We'll let the philosophers try to wrestle with the
> 	 * question of whether failing to remove that which was not
> 	 * there in the first place is failure. For us, we'll silently
> 	 * consider it all good. */
>     }
> --8<---------------cut here---------------end--------------->8---

OK, I see why that assignment gets skipped. I think that's not the
actual bug, but rather message->modified should be initialized in
_notmuch_message_create_for_document. I'll have a closer look later
today

d
.

  reply	other threads:[~2022-05-16 12:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16  9:27 [bug] possible condition depending on uninitialized value in _notmuch_message_sync Eliza Velasquez
2022-05-16  9:47 ` David Bremner
2022-05-16 11:33   ` Eliza Velasquez
2022-05-16 12:01     ` David Bremner [this message]
2022-05-20 12:46     ` David Bremner
2022-05-25  1:42       ` Eliza Velasquez

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=877d6lwusq.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=eliza@eliza.sh \
    --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).