unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Eric Blake <eblake@redhat.com>
To: David Bremner <david@tethera.net>
Cc: notmuch@notmuchmail.org
Subject: Re: notmuch breaks on \. in config file with upgrade from glib2 2.76.1 to 2.76.5
Date: Mon, 11 Sep 2023 10:06:10 -0500	[thread overview]
Message-ID: <kr77g7olz2qqrxtk3ujlyipt5o6eff6l4twhewkdyoepb5ynru@gziasy3a3jmk> (raw)
In-Reply-To: <87wmwy9r4g.fsf@tethera.net>

On Sun, Sep 10, 2023 at 08:58:39AM -0300, David Bremner wrote:
> David Bremner <david@tethera.net> writes:
> 
> > I usually like to start with a failing test, but it seems that may not
> > be possible here, since the actual failure only happens with specific
> > versions of glib.
>
> I guess the more interesting issue is making sure we propagate parsing
> errors from glib properly. Do you have an example of an init file syntax
> error that does consistently trigger a NULL return value (i.e. not bad
> escape, since that is apparently in flux).

Sure - put in some invalid UTF-8 (unlike invalid escape sequences
changing behavior over time, invalid UTF-8 has always been invalid in
g_key_file_get_string).  For example,

printf 'q3=from:\xff\n' >> .notmuch-config

into a config file that previously contains valid UTF-8 and ends in a
[query] block.

Even with glib2-2.76.1 installed, I'm back to the scenario where
'notmuch --config=.notmuch-config config list' outputs nothing with
exit status 0 (when it SHOULD have been reporting glib's error, "Key
file contains key “%s” with value “%s” which is not UTF-8").

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
\r

      reply	other threads:[~2023-09-11 15:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06 12:49 notmuch breaks on \. in config file with upgrade from glib2 2.76.1 to 2.76.5 Eric Blake
2023-09-06 14:37 ` Michael J Gruber
2023-09-06 15:42   ` Eric Blake
2023-09-06 15:26 ` [PATCH] config: Inform user if config file is broken Eric Blake
2023-09-06 15:48   ` David Bremner
2023-09-06 16:11     ` Eric Blake
2023-09-10  0:37 ` notmuch breaks on \. in config file with upgrade from glib2 2.76.1 to 2.76.5 David Bremner
2023-09-10 11:58   ` David Bremner
2023-09-11 15:06     ` Eric Blake [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=kr77g7olz2qqrxtk3ujlyipt5o6eff6l4twhewkdyoepb5ynru@gziasy3a3jmk \
    --to=eblake@redhat.com \
    --cc=david@tethera.net \
    --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).