mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
Correct crash in child processes under armeabi Android
* exec/trace.c (process_system_call) <READLINKAT_SYSCALL>: Examine tracee->waiting_for_syscall and avoid rewriting user arguments if a system call is presently being executed by the kernel. Reported by Romário Rios <romariorios@protonmail.com>.
This commit is contained in:
parent
b892da5f61
commit
cd69120731
1 changed files with 14 additions and 8 deletions
22
exec/trace.c
22
exec/trace.c
|
|
@ -1039,16 +1039,22 @@ process_system_call (struct exec_tracee *tracee)
|
|||
#endif /* READLINK_SYSCALL */
|
||||
case READLINKAT_SYSCALL:
|
||||
|
||||
/* Handle this readlinkat system call. */
|
||||
rc = handle_readlinkat (callno, ®s, tracee,
|
||||
&result);
|
||||
/* This system call is already in progress if
|
||||
TRACEE->waiting_for_syscall is true. */
|
||||
|
||||
/* rc means the same as in `handle_exec'. */
|
||||
if (!tracee->waiting_for_syscall)
|
||||
{
|
||||
/* Handle this readlinkat system call. */
|
||||
rc = handle_readlinkat (callno, ®s, tracee,
|
||||
&result);
|
||||
|
||||
if (rc == 1)
|
||||
goto report_syscall_error;
|
||||
else if (rc == 2)
|
||||
goto emulate_syscall;
|
||||
/* rc means the same as in `handle_exec'. */
|
||||
|
||||
if (rc == 1)
|
||||
goto report_syscall_error;
|
||||
else if (rc == 2)
|
||||
goto emulate_syscall;
|
||||
}
|
||||
|
||||
/* Fallthrough. */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue