From: Eli Zaretskii <eliz@gnu.org>
To: Matthieu Hauglustaine <matt.hauglustaine@gmail.com>
Cc: 40555@debbugs.gnu.org
Subject: bug#40555: 27.0.90; out of bound array access in setup_process_coding_systems
Date: Sat, 11 Apr 2020 19:05:21 +0300 [thread overview]
Message-ID: <83o8rykny6.fsf@gnu.org> (raw)
In-Reply-To: <m2y2r259lr.fsf@gmail.com> (message from Matthieu Hauglustaine on Sat, 11 Apr 2020 17:24:16 +0200)
merge 40555 40023
thanks
> From: Matthieu Hauglustaine <matt.hauglustaine@gmail.com>
> Date: Sat, 11 Apr 2020 17:24:16 +0200
>
> I've experienced a EXC_BAD_ACCESS when using Emacs 27.0.90 on OS X
> 10.15.
>
> The root cause appears to be an out of bound access on
> proc_decode_coding_system (src/process.c:7988), in
> setup_process_coding_systems() when calling setup_coding_system(). This
> results in an invalid write to coding->id from
> CHECK_CODING_SYSTEM_GET_ID (src/coding.c:5678). [1] for the stacktrace.
>
> On Emacs initialization (init_process_emacs(), src/emacs.c:8234),
> RLIMIT_NOFILE.rlim_cur is set to FD_SETSIZE, and the assumption seem to
> be that this limit will never change for the lifetime of the
> process. proc_decode_coding_system and proc_encode_coding_system are
> declared with a size of FD_SETSIZE (src/process.c:311).
>
> However, on OS X systems, the call to NSURL.getResourceValue:forKey:
> (src/nsfns.c:497), when opening a file, apparently result in a call to
> setrlimit with RLIMIT_NOFILE.rlim_cur > FD_SETSIZE.
>
> Thus, when the number of FDs opened by Emacs is greater than FD_SETSIZE,
> an illegal access is done when make-process is called.
Thankjs, this is bug#40023. There's a patch there, maybe you could
try it. If the patch works for you, we could install it on the
emacs-27 branch.
next prev parent reply other threads:[~2020-04-11 16:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-11 15:24 bug#40555: 27.0.90; out of bound array access in setup_process_coding_systems Matthieu Hauglustaine
2020-04-11 16:05 ` Eli Zaretskii [this message]
2020-04-11 17:36 ` Matthieu Hauglustaine
2020-04-14 14:06 ` Robert Pluim
2020-04-14 17:37 ` Eli Zaretskii
2020-04-15 8:06 ` Robert Pluim
2020-04-15 9:40 ` Eli Zaretskii
2020-04-15 10:01 ` Robert Pluim
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83o8rykny6.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=40555@debbugs.gnu.org \
--cc=matt.hauglustaine@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.