diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2026-05-18 22:59:45 -0700 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2026-05-18 23:10:42 -0700 |
| commit | efb83df331425ae66e9d031a1ac35c2215612b52 (patch) | |
| tree | 11300ad0edbfda0cd38ccfa5a8629e1b2ecfe975 /java/org/gnu/emacs/EmacsDialogButtonLayout.java | |
| parent | 71336e837a51986aa12ca7e27e6ae0549d509aec (diff) | |
Don’t trust RLIMIT_NOFILE in src/process.c
Problem discovered on Fedora 44 x86-64 when using GCC 16.1.1 with
-fsanitize=address, with test/src/process-tests.el tests that use
process-tests--with-raised-rlimit. This function overrides the
default of 1024 for the maximum number of open files, which causes
undefined behavior (subscript errors) in src/process.c.
* src/process.c (inrange_fd, inrange_pipe): New functions.
(allocate_pty, create_process, create_pty, Fmake_pipe_process)
(Fmake_serial_process, connect_network_socket)
(network_interface_info, server_accept_connection)
(Fprocess_send_eof, child_signal_init):
Check that all newly allocated file descriptors are less than
FD_SETSIZE; close them and fail otherwise.
(create_pty, Fmake_pipe_process, Fmake_serial_process)
(connect_network_socket, server_accept_connection)
(child_signal_init): Remove no-longer-needed comparisons
to FD_SETSIZE, now that inrange_fd and inrange_pipe
do the checking for us.
Diffstat (limited to 'java/org/gnu/emacs/EmacsDialogButtonLayout.java')
0 files changed, 0 insertions, 0 deletions
