Subject: 26.2.90; (process-attributes nonexistent-pid) segmentation fault

From: Xu Chunyang <[email-masked]>
Date: Tue, 18 Jun 2019 21:25:40 +0800

Emacs crashes when I run the following (the PID 123456 doesn't exist)

    (process-attributes 123456)

And I can reproduce it from Emacs -Q:

    ~ $ emacs -Q --batch --eval '(print (process-attributes 123456))'
    Fatal error 11: Segmentation faultzsh: segmentation fault  emacs -Q --batch --eval '(print (process-attributes 123456))'
    ~ $ emacs --version | head -1
    GNU Emacs 26.2.90
    ~ $

In GNU Emacs 26.2.90 (build 1, x86_64-apple-darwin18.6.0, Carbon Version 158 AppKit 1671.5)
 of 2019-06-13 built on Chunyangs-MacBook-Air.local
Repository revision: 7ba854289bd169f1e5f4fbdbc4ae2bef24b9811f
Windowing system distributor 'Apple Inc.', version 10.14.5
Recent messages:
Loading /Users/xcy/.emacs.d/xcy.el (source)...done
Loading /Users/xcy/.emacs.d/var/recentf-save.el (source)...done
Cleaning up the recentf list...done (0 removed) [2 times]

Configured using:
 'configure --with-modules'

Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS LCMS2

Important settings:
  value of $LANG: zh-Hans_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  global-atomic-chrome-edit-mode: t
  shell-dirtrack-mode: t
  server-mode: t
  minibuffer-electric-default-mode: t
  rainbow-delimiters-mode: t
  paredit-mode: t
  hl-todo-mode: t
  company-mode: t
  show-paren-mode: t
  region-state-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  electric-pair-mode: t
  winner-mode: t
  global-auto-revert-mode: t
  prescient-persist-mode: t
  prompt-watcher-mode: t
  minibuffer-depth-indicate-mode: t
  save-place-mode: t
  recentf-mode: t
  savehist-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mac-mouse-wheel-mode: t
  global-prettify-symbols-mode: t
  prettify-symbols-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  temp-buffer-resize-mode: t
  size-indication-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
~/src/e2ansi/e2ansi hides /Users/xcy/.emacs.d/elpa-26.2.90/e2ansi-20190517.1902/e2ansi
~/src/e2ansi/e2ansi-magic hides /Users/xcy/.emacs.d/elpa-26.2.90/e2ansi-20190517.1902/e2ansi-magic
~/src/e2ansi/e2ansi-list hides /Users/xcy/.emacs.d/elpa-26.2.90/e2ansi-20190517.1902/e2ansi-list
~/src/e2ansi/e2ansi-silent hides /Users/xcy/.emacs.d/elpa-26.2.90/e2ansi-20190517.1902/e2ansi-silent
~/src/github-stars.el/github-stars hides /Users/xcy/.emacs.d/elpa-26.2.90/github-stars-20190517.1319/github-stars
~/src/grab-mac-link/grab-mac-link hides /Users/xcy/.emacs.d/elpa-26.2.90/grab-mac-link-20190419.1307/grab-mac-link
~/src/helm-lastpass/helm-lastpass hides /Users/xcy/.emacs.d/elpa-26.2.90/helm-lastpass-20180722.806/helm-lastpass
~/src/region-state.el/region-state hides /Users/xcy/.emacs.d/elpa-26.2.90/region-state-20181205.1746/region-state
~/src/swap-regions.el/swap-regions hides /Users/xcy/.emacs.d/elpa-26.2.90/swap-regions-20180915.1346/swap-regions
~/src/web-search.el/web-search hides /Users/xcy/.emacs.d/elpa-26.2.90/web-search-20181028.525/web-search
~/src/yagist.el/yagist hides /Users/xcy/.emacs.d/elpa-26.2.90/yagist-20160418.508/yagist
~/src/youdao-dictionary.el/youdao-dictionary hides /Users/xcy/.emacs.d/elpa-26.2.90/youdao-dictionary-20180714.414/youdao-dictionary
/Users/xcy/.emacs.d/elpa-26.2.90/flymake-1.0.6/flymake hides /Users/xcy/src/emacs-mac/lisp/progmodes/flymake
/Users/xcy/.emacs.d/elpa-26.2.90/soap-client-3.1.5/soap-client hides /Users/xcy/src/emacs-mac/lisp/net/soap-client
/Users/xcy/.emacs.d/elpa-26.2.90/soap-client-3.1.5/soap-inspect hides /Users/xcy/src/emacs-mac/lisp/net/soap-inspect

Features:
(shadow sort mailalias epa-mail flyspell-popup popup flyspell ispell
mail-extr emacsbug message puny dired-x dired dired-loaddefs rfc822 mml
mml-sec epa epg gnus-util rmail rmail-loaddefs mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils atomic-chrome
websocket url-cookie url-domsuf url-util bindat ob-sml ob-rust org-habit
org-agenda org-protocol ob-shell shell ob-scheme ob-ruby ob-R ob-python
ob-perl ob-org ob-lua ob-lisp ob-latex ob-eshell ob-ditaa ob-C cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs ob-clojure ob-awk ob-racket org-eww org-element avl-tree
generator org org-macro org-footnote org-pcomplete pcomplete org-list
org-faces org-entities org-version ob-emacs-lisp ob ob-tangle org-src
ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval
org-compat org-macs org-loaddefs find-func server finda json map
minibuf-eldef cal-china lunar solar cal-dst cal-menu calendar
cal-loaddefs rainbow-delimiters paredit hl-todo company-oddmuse
company-keywords company-etags etags xref project company-gtags
company-dabbrev-code company-dabbrev company-files company-capf
company-cmake company-xcode company-clang company-semantic company-eclim
company-template company-bbdb company derived let-alist gif-screencast
elisp-demos hydra lv el-search-x el-search noutline outline hideshow
help-fns radix-tree stream-x stream thunk thingatpt cl-print rmc
pdf-tools compile comint ansi-color cus-edit cus-start cus-load pdf-view
bookmark pp jka-compr pdf-cache pdf-info tq pdf-util format-spec
image-mode pdf-loader paren region-state undo-tree diff ace-link avy
elec-pair winner ring ibuf-macs autorevert filenotify prescient mb-depth
saveplace recentf tree-widget wid-edit savehist
sanityinc-tomorrow-eighties-theme color-theme-sanityinc-tomorrow color
pcase no-littering dash subr-x diminish use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key bind-key
easy-mmode cl-extra help-mode use-package-core finder-inf edmacro kmacro
kotl-autoloads rx cl info advice package easymenu epg-config
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib mule-util time-date china-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/mac-win mac-win term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads kqueue mac lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 563329 9950)
 (symbols 48 47679 2)
 (miscs 40 3167 215)
 (strings 32 163119 10977)
 (string-bytes 1 5053082)
 (vectors 16 49276)
 (vector-slots 8 1224022 15208)
 (floats 8 918 233)
 (intervals 56 1006 0)
 (buffers 992 11))