X-Envelope-From: notmuch-bounces@notmuchmail.org  Sat Jun 20 09:24:26 2026
Return-Path: <notmuch-bounces@notmuchmail.org>
X-Original-To: nmbug@yantan.tethera.net
Delivered-To: nmbug@yantan.tethera.net
Received: from yantan.tethera.net (localhost [127.0.0.1])
	by mail.notmuchmail.org (Postfix) with ESMTP id BA64C5F890;
	Sat, 20 Jun 2026 09:24:26 +0000 (UTC)
X-Greylist: delayed 492 seconds by postgrey-1.36 at yantan; Sat, 20 Jun 2026 09:24:23 UTC
Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37])
	by mail.notmuchmail.org (Postfix) with ESMTPS id 5ABB05F813
	for <notmuch@notmuchmail.org>; Sat, 20 Jun 2026 09:24:23 +0000 (UTC)
Received: from meesny.iki.fi (meesny.iki.fi [195.140.195.201])
	(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 lahtoruutu.iki.fi (Postfix) with ESMTPS id 4gj82s6rrpz49PwP
	for <notmuch@notmuchmail.org>; Sat, 20 Jun 2026 12:16:05 +0300 (EEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu;
	t=1781946966;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 in-reply-to:in-reply-to:references:references;
	bh=p5VydiswmsNF7ghUi1NdNJ59ADQXj1ICOvvD5o/3V2M=;
	b=EgsYYyxNKNBn8R4oYD04LizRWnJKifgub3ezIBiM/psA92f3G9Spq/zHctia6nODsan2RG
	LQMaBvjc1R0jm7vYibKMjHmVeGv+3ZQRHeTPu9CCuV+h/rr3Tdy1GIt4tPTW8Zxht2grvF
	c/tYrVUqkADTTKV/I0VrE8BvZq4tD6DDKfPXzjeuUiilUbzVCOVfVPktBo3OiHGnMsyrI+
	ZOSV/E6h49ySd4u8wyuzln0/jB/DNKNd03f1M7MniZZQmR4/292z9Rai+47Hp/T/3xfNWt
	xt8viFgdF+u+7N5SEIi1Toa+QzcHbN+8Ab03d+TRlyEEaKQ351fS+56xejUjJg==
Received: from c53 (gw1.nor.fi [185.218.193.67])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange secp256r1 server-signature RSA-PSS (2048 bits) server-digest SHA256)
	(No client certificate requested)
	(Authenticated sender: too)
	by meesny.iki.fi (Postfix) with ESMTPSA id 4gj82p2Dg2zyQq;
	Sat, 20 Jun 2026 12:16:02 +0300 (EEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny;
	t=1781946962;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 in-reply-to:in-reply-to:references:references;
	bh=p5VydiswmsNF7ghUi1NdNJ59ADQXj1ICOvvD5o/3V2M=;
	b=ttWZq/MQPWWMKD2QVNTQl32/wxuQUBszTxrN+LBLijJFq123NwJQJS332OdeKNqLfBYTbn
	Qd0Ho/lcCcVvrc4CsL4SItmC5rZMAY0dkKKUlBMvwpVG+UZS6n8//2h7PweJkzqdDS1yye
	I+wfmsBYwHgrNcPIVGIa5cSCCuC5P7k=
ARC-Seal: i=1; a=rsa-sha256; d=iki.fi; s=meesny; cv=none; t=1781946962;
	b=pFd9jwCjyJVY3dW0GlbR0TCuuLjtgkaadHTcymotna0YFY4I0NNt5x9FBQVEw9BcPpdoYH
	HkBSM8AzO0Up8ylSrnQLts8/dI8ay54x2MD2b8c3Lqd1844d0m0tPCKX5ao7gc4mWYQXaf
	tOUmTgIJhM3YEWWNg/2LGyzIyanhnLM=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi;
	s=meesny; t=1781946962;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 in-reply-to:in-reply-to:references:references;
	bh=p5VydiswmsNF7ghUi1NdNJ59ADQXj1ICOvvD5o/3V2M=;
	b=Lq6uPH48K+DYziEo3sXI1Xd6m9W8csR58RZqxU1i2sk9FTMc23/Iw14gyAj0m/hAnejtLa
	hWfDM+0h1GFJmeCnyCLbOyKqYKMz0wq+oa6jBODwmi+ziO7ET2toqjOa7WzJw8p21jGEeP
	e+oYa6jpATkTXLC8CavHLC4I0Fulgek=
ARC-Authentication-Results: i=1;
	ORIGINATING;
	auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi
From: Tomi Ollila <tomi.ollila@iki.fi>
To: Dick Marinus <dick@mrns.nl>, notmuch@notmuchmail.org
Subject: Re: [PATCH 1/2] CLI/reply: use static const for reply_to_map
In-Reply-To: <20260617192542.3516741-2-dick@mrns.nl>
References: <20260617192542.3516741-1-dick@mrns.nl>
 <20260617192542.3516741-2-dick@mrns.nl>
User-Agent: Notmuch/0.40+24~gc45207d (https://notmuchmail.org) Emacs/27.1
X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
	$[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
	!)g;OY^,BjTbr)Np:%c_o'jj,Z
Date: Sat, 20 Jun 2026 12:16:00 +0300
Message-ID: <y12ijeo.9lm4qp-too@iki.fi>
MIME-Version: 1.0
Message-ID-Hash: FV3CYTQMTKX7NUZJ644Z5MG7OQNRELMZ
X-Message-ID-Hash: FV3CYTQMTKX7NUZJ644Z5MG7OQNRELMZ
X-MailFrom: tomi.ollila@iki.fi
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." <notmuch.notmuchmail.org>
List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
List-Owner: <mailto:notmuch-owner@notmuchmail.org>
List-Post: <mailto:notmuch@notmuchmail.org>
List-Subscribe: <mailto:notmuch-join@notmuchmail.org>
List-Unsubscribe: <mailto:notmuch-leave@notmuchmail.org>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

On Wed, Jun 17 2026, Dick Marinus wrote:

> It's recommended to store these functions in a const struct, for some
> reason I even got a segmentation fault without this.

The change looks sane (I also checked all references to reply_to_map in
code). With this the array does not need to create on-the-fly in that
function but can (even) be created to read-only location at compile-time
(barring binding to dynamic libs when program starts but still 
mpu-protected...)

But about the commit message. Who recommends this thing? you? god?
deepseek? someone(tm)? Looks somewhat vague statement to me.

Then the sigsegv - I don't see why the code before that change would
sigsegv. Without more details so that it could be reproduced such
a statement should not be mentioned in commit message.

Tomi

PS. I am not against (L)LM -assisted coding, provided that the one 
using is understands every change made by the "AI" tools. This is
a general statement and not suspecting whether this patch (series)
would not satisfy this :D


> ---
>  notmuch-reply.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/notmuch-reply.c b/notmuch-reply.c
> index 44297251d..c72ca227e 100644
> --- a/notmuch-reply.c
> +++ b/notmuch-reply.c
> @@ -329,7 +329,7 @@ add_recipients_from_message (GMimeMessage *reply,
>  			     GMimeMessage *message,
>  			     bool reply_all)
>  {
> -    struct {
> +    static const struct {
>  	InternetAddressList * (*get_header)(GMimeMessage *message);
>  	GMimeAddressType recipient_type;
>      } reply_to_map[] = {
> -- 
> 2.54.0
>
> _______________________________________________
> notmuch mailing list -- notmuch@notmuchmail.org
> To unsubscribe send an email to notmuch-leave@notmuchmail.org
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org
