all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: xuchunyang <mail@xuchunyang.me>
Cc: 36279@debbugs.gnu.org, rpluim@gmail.com, npostavs@gmail.com
Subject: bug#36279: 26.2.90; (process-attributes nonexistent-pid) segmentation fault
Date: Tue, 18 Jun 2019 20:44:41 +0300	[thread overview]
Message-ID: <83lfxyss8m.fsf@gnu.org> (raw)
In-Reply-To: <3593bb18-c70f-4759-bf34-a245cf1ddf9b@www.fastmail.com> (message from xuchunyang on Wed, 19 Jun 2019 00:23:20 +0800)

> Date: Wed, 19 Jun 2019 00:23:20 +0800
> From: xuchunyang <mail@xuchunyang.me>
> Cc: 36279@debbugs.gnu.org, Noam Postavsky <npostavs@gmail.com>
> 
> It fixes the issue for me too. (process-attributes 123456) returns nil instead of crashing Emacs.
> 
> > 
> > diff --git a/src/sysdep.c b/src/sysdep.c
> > index 1e35e06b63..518ecebcf6 100644
> > --- a/src/sysdep.c
> > +++ b/src/sysdep.c
> > @@ -3798,7 +3798,7 @@ system_process_attributes (Lisp_Object pid)
> >    CONS_TO_INTEGER (pid, int, proc_id);
> >    mib[3] = proc_id;
> >  
> > -  if (sysctl (mib, 4, &proc, &proclen, NULL, 0) != 0)
> > +  if (sysctl (mib, 4, &proc, &proclen, NULL, 0) != 0 || proclen == 0)
> >      return attrs;
> >  
> >    uid = proc.kp_eproc.e_ucred.cr_uid;
> >

Thanks.  Robert, please push to the emacs-26 branch.

(I understand this problem is quite old, is that right?)





  reply	other threads:[~2019-06-18 17:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-18 13:25 bug#36279: 26.2.90; (process-attributes nonexistent-pid) segmentation fault Xu Chunyang
2019-06-18 13:31 ` Noam Postavsky
2019-06-18 14:05   ` xuchunyang
2019-06-18 15:23     ` Robert Pluim
2019-06-18 16:23       ` xuchunyang
2019-06-18 17:44         ` Eli Zaretskii [this message]
2019-06-18 17:53           ` Robert Pluim
2019-06-18 18:06             ` Eli Zaretskii
2019-06-18 18:14               ` Robert Pluim
2019-06-19  7:06                 ` Robert Pluim
2019-06-19  8:01                   ` Andreas Schwab
2019-06-19 10:21                     ` Robert Pluim
2019-06-19 10:29                       ` Andreas Schwab
2019-06-19 13:40                         ` Robert Pluim
2019-06-19 15:15                   ` Eli Zaretskii
2019-06-20  8:46                     ` Robert Pluim
2019-06-18 16:10     ` Eli Zaretskii
2019-06-18 16:07 ` Eli Zaretskii

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=83lfxyss8m.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=36279@debbugs.gnu.org \
    --cc=mail@xuchunyang.me \
    --cc=npostavs@gmail.com \
    --cc=rpluim@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.