From: David Bremner <david@tethera.net>
To: Ralph Seichter <abbot@monksofcool.net>, notmuch@notmuchmail.org
Subject: Re: Bug: SIGABRT if "notmuch dump" output file is not writeable
Date: Tue, 23 Jul 2019 15:53:42 -0300 [thread overview]
Message-ID: <87sgqwshu1.fsf@tethera.net> (raw)
In-Reply-To: <875zns4pnm.fsf@ra.horus-it.com>
Ralph Seichter <abbot@monksofcool.net> writes:
> gzclose_w(output) has already been called in line 332, before Notmuch
> attempts to rename the temp file to the output file. At that point,
> 'output' should be set to null as it is being checked later, but that
> erroneously only happens in case the close operation fails.
>
> The rename in line 341 fails because of permission/ownership issues,
> 'ret' contains the error code for that, 'output' is still non-null, so
> gzclose_w is called again -- ergo boom.
That sounds plausible to me. Thanks for thinking about this longer than
I did. I'll be happy to look at a patch.
d
prev parent reply other threads:[~2019-07-27 23:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 18:47 Bug: SIGABRT if "notmuch dump" output file is not writeable Ralph Seichter
2019-07-22 22:15 ` David Bremner
2019-07-22 23:37 ` Ralph Seichter
2019-07-23 14:57 ` David Bremner
2019-07-23 17:38 ` Ralph Seichter
2019-07-23 18:53 ` David Bremner [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=87sgqwshu1.fsf@tethera.net \
--to=david@tethera.net \
--cc=abbot@monksofcool.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).