unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Bruno Haible <bruno@clisp.org>, Paul Eggert <eggert@cs.ucla.edu>
Cc: 65339@debbugs.gnu.org
Subject: bug#65339: build failure on Android (Termux)
Date: Wed, 16 Aug 2023 17:19:59 +0300	[thread overview]
Message-ID: <838rab83xs.fsf@gnu.org> (raw)
In-Reply-To: <4722817.cl5Wp8zd50@nimes> (message from Bruno Haible on Wed, 16 Aug 2023 12:25:21 +0200)

> From: Bruno Haible <bruno@clisp.org>
> Date: Wed, 16 Aug 2023 12:25:21 +0200
> 
> fdsan: attempted to close file descriptor 2, expected to be unowned, actually owned by FILE* 0xb678438c
> make[2]: *** [Makefile:1012: bootstrap-emacs.pdmp] Aborted
> make[2]: *** Deleting file 'bootstrap-emacs.pdmp'
> make[2]: Leaving directory '/data/data/com.termux/files/home/emacs/src'
> make[1]: *** [Makefile:554: src] Error 2
> make[1]: Leaving directory '/data/data/com.termux/files/home/emacs'
> make[1]: Entering directory '/data/data/com.termux/files/home/emacs'
> ***
> *** "make all" failed with exit status 2.
> 
> The line "fdsan: attempted to close file descriptor 2, expected to be unowned"
> is apparently emitted by Android's "file descriptor sanitizer".
> 
> There's a discussion of this message here:
> https://github.com/termux/termux-packages/issues/6592
> and a workaround patch has been posted here:
> https://github.com/termux/termux-packages/blob/master/packages/emacs/disable-fdsan.patch
> 
> With this workaround patch, the build gets much further: It produces a
> working 'src/emacs' executable.
> 
> Would it be possible to
>   - either change Emacs' FILE / dirfd handling so that it no longer produces
>     this fdsan alert,
>   - or include the workaround patch in Emacs upstream?

What is problematic with our FILE / dirfd handling that causes wrath
on the part of the Android gods?





      parent reply	other threads:[~2023-08-16 14:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-16 10:25 bug#65339: build failure on Android (Termux) Bruno Haible
2023-08-16 12:38 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-16 22:26   ` Bruno Haible
2023-08-22  0:58     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-16 14:19 ` Eli Zaretskii [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://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=838rab83xs.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=65339@debbugs.gnu.org \
    --cc=bruno@clisp.org \
    --cc=eggert@cs.ucla.edu \
    /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).