From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2M/3GR49gmJQkAAAbAwnHQ (envelope-from ) for ; Mon, 16 May 2022 14:01:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kLAZGR49gmLEnQAAG6o9tA (envelope-from ) for ; Mon, 16 May 2022 14:01:34 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D0B823ED3E for ; Mon, 16 May 2022 14:01:33 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 58A445F73C; Mon, 16 May 2022 12:01:31 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id D0B4D5F6B7 for ; Mon, 16 May 2022 12:01:27 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 49D5B5FBD7; Mon, 16 May 2022 08:01:27 -0400 (EDT) Received: (nullmailer pid 342928 invoked by uid 1000); Mon, 16 May 2022 12:01:25 -0000 From: David Bremner To: Eliza Velasquez , notmuch@notmuchmail.org Subject: Re: [bug] possible condition depending on uninitialized value in _notmuch_message_sync In-Reply-To: <87k0aliuen.fsf@eliza.sh> References: <87o7zxj086.fsf@eliza.sh> <87lev1x0zy.fsf@tethera.net> <87k0aliuen.fsf@eliza.sh> Date: Mon, 16 May 2022 09:01:25 -0300 Message-ID: <877d6lwusq.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: PUDCCHIM373Q2DF23FSDHFPVKTFLZDSY X-Message-ID-Hash: PUDCCHIM373Q2DF23FSDHFPVKTFLZDSY X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652702494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=xJxTWAu5lhB5uq20zP2FxsXvpv0cwYCK6OrN/DH4TZE=; b=Gg9HfWek9TvBGS0BEKNEV4+jF29MpkuoAXS36aI5SuG4o8Jx7JKkF4PgoJvrkHfueaBO2o dXgFzMB7URaLr3VaDXvo4NzIZjCFrgvjijPthhcvbQney8Yr4IQQv/fBqN7E3jQapIWVzr WneXI9Ev+2uWxxntiQumcUNfbvDm3LFXrcBKICPbPa/VABObZ7wADTdhOp8Vcw3kVACIcT b3EaDrVzYjRQuyIKQadmKkYIjo9OUQCgybC0m0z/wYV07rshUpBBYaynAWQLb62heKkjF2 PMLs9cCI907psyOaKTxR7rMEh/Jm6opdFw7+d4bAO0Y2mPHuyrDpC8TsgHD2VA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652702494; a=rsa-sha256; cv=none; b=JMHi/4IttZ6vN88hi8gDL1vCp7KW+C+Lx8fDc0TjcNj6IG9C9heU0qTMU3OOg1edhHWQkT mR6iPmNrq2/VIVN3A4FwYAYQF/pOOjcv1Hg+AlaPNrKPIvUmTxIvftL44gsHLrPWdzXeAI 8+9fLZFL3HBTLB9dYFZK+imLXRXEjtuoy46UorLAyFysJIVbnbgrnXpa115i0T91ZPf0oQ xNwO6Xm/6wvyyZgFXFGlaQFCUtXwL6xp+05wZkZHI7uXLqzUa4INzl2EoRTb8XO7mQYEQn JBvTJxhOmQ9uZ9s8akyEN6E4i6oljzENdZRSfQPly/Nhq9wtNkL2oh8PNVleMQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -2.98 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: D0B823ED3E X-Spam-Score: -2.98 X-Migadu-Scanner: scn0.migadu.com X-TUID: mNb8TtTrJU24 Eliza Velasquez 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 .