From: Eli Zaretskii <eliz@gnu.org>
To: Henrik Grimler <henrik@grimler.se>
Cc: 47596@debbugs.gnu.org
Subject: bug#47596: File descriptor error when exiting emacs on android 11
Date: Mon, 05 Apr 2021 15:57:45 +0300 [thread overview]
Message-ID: <835z10dh2u.fsf@gnu.org> (raw)
In-Reply-To: <aebd3ec4283ee06473e7e5d69efcddc2d409b867.camel@grimler.se> (message from Henrik Grimler on Mon, 05 Apr 2021 11:48:50 +0200)
> From: Henrik Grimler <henrik@grimler.se>
> Cc: 47596@debbugs.gnu.org
> Date: Mon, 05 Apr 2021 11:48:50 +0200
>
> A better way to fix the error is to use buferr instead of stderr when
> calling `close_streams` in `close_output_streams`. I cannot see any
> obvious problems with this, so I propose this patch:
You are operating on the wrong stream, so I do see a problem with this
patch. The purpose of this fragment is to close stderr, not the
buffered copy of stderr.
> --- ./src/sysdep.c.orig 2021-04-05 09:06:33.847835653 +0000
> +++ ./src/sysdep.c 2021-04-05 09:05:47.957856162 +0000
> @@ -2837,8 +2837,8 @@
> sanitizer might report to stderr after this function is invoked.
> */
> bool err = buferr && (fflush (buferr) != 0 || ferror (buferr));
> if (err | (ADDRESS_SANITIZER
> - ? fflush (stderr) != 0 || ferror (stderr)
> - : close_stream (stderr) != 0))
> + ? fflush (buferr) != 0 || ferror (buferr)
> + : close_stream (buferr) != 0))
> _exit (EXIT_FAILURE);
> }
> ^L
> ```
>
> With it I can start and exit emacs on android without the fdsan error.
Is ADDRESS_SANITIZER defined in your build?
In any case, I do want to wait for the Android developers to respond
to the issue in their tracker.
Thanks.
next prev parent reply other threads:[~2021-04-05 12:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-04 19:20 bug#47596: File descriptor error when exiting emacs on android 11 Henrik Grimler
2021-04-04 19:31 ` Eli Zaretskii
2021-04-04 20:11 ` Henrik Grimler
2021-04-05 8:14 ` Henrik Grimler
2021-04-05 8:59 ` Henrik Grimler
2021-04-05 9:48 ` Henrik Grimler
2021-04-05 12:57 ` Eli Zaretskii [this message]
2021-04-05 13:38 ` Henrik Grimler
2021-04-05 12:52 ` Eli Zaretskii
2021-04-05 12:50 ` Eli Zaretskii
2021-04-05 17:29 ` Henrik Grimler
2021-05-06 10:45 ` Lars Ingebrigtsen
2021-05-10 7:23 ` Henrik Grimler
2021-05-11 17:06 ` Henrik Grimler
2021-05-12 13:52 ` Lars Ingebrigtsen
2021-05-12 14:01 ` Eli Zaretskii
2022-06-29 10:47 ` Lars Ingebrigtsen
2022-06-29 13:25 ` Henrik Grimler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-30 9:07 ` Lars Ingebrigtsen
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://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=835z10dh2u.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=47596@debbugs.gnu.org \
--cc=henrik@grimler.se \
/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://git.savannah.gnu.org/cgit/emacs.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).