Recipe from 'emacs -Q': M-: (directory-files "." nil t) RET Expected result: wrong-type-argument error is signaled. Actual result: access violation, backtrace below (non-printable characters replaced with "."). Thread 1 received signal SIGSEGV, Segmentation fault. SCHARS (string=XIL(0xd560)) at lisp.h:1484 1484 ptrdiff_t nchars = XSTRING (string)->u.s.size; #0 SCHARS (string=XIL(0xd560)) at lisp.h:1484 nchars = 4 #1 0x000000040016cee2 in compile_pattern (pattern=XIL(0xd560), regp=0x0, translate=XIL(0x400730fc5), posix=false, multibyte=true) at search.c:237 cp = 0x4006d92d8 cpp = 0x4006d9f80 #2 0x000000040016dc14 in fast_string_match_internal (regexp=XIL(0xd560), string=XIL(0x3e177e4), table=XIL(0x400730fc5)) at search.c:493 val = 17187133824 bufp = 0x56b55e0 #3 0x000000040015fce4 in directory_files_internal (directory=XIL(0x3e17924), full=XIL(0xd560), match=XIL(0xd560), nosort=XIL(0), attrs=false, id_format=XIL(0)) at dired.c:256 len = 1 name = XIL(0x3e177e4) finalname = XIL(0x3e17824) wanted = false dp = 0x400701580 directory_nbytes = 21 list = XIL(0) dirfilename = XIL(0x3e17884) encoded_directory = XIL(0x3e17864) needsep = true count = 13 w32_save = XIL(0) directory_volatile = XIL(0x3e17924) fd = 0 d = 0x56b55e0 case_table = XIL(0x400730fc5) #4 0x00000004001600a2 in Fdirectory_files (directory=XIL(0x3e17924), full=XIL(0xd560), match=XIL(0xd560), nosort=XIL(0)) at dired.c:342 handler = XIL(0) #5 0x00000004001b4c6f in eval_sub (form=XIL(0x400cb09b3)) at eval.c:2334 i = 4 maxargs = 4 args_left = XIL(0) numargs = make_number(3) fun = XIL(0x4002dda45) val = XIL(0) original_fun = XIL(0x4ef0) original_args = XIL(0x400cb09a3) funcar = XIL(0x4001b74f4) count = 12 argvals = {XIL(0x3e171a4), XIL(0xd560), XIL(0xd560), XIL(0), XIL(0xbfe270), XIL(0x400105d3d), XIL(0x4006ed980), XIL(0x4006f5a20)} #6 0x00000004001b424d in Feval (form=XIL(0x400cb09b3), lexical=XIL(0)) at eval.c:2144 count = 11 #7 0x00000004001b6419 in funcall_subr (subr=0x4006286c0 , numargs=2, args=0xbfe4f0) at eval.c:2936 internal_argbuf = {XIL(0xbfe3d0), XIL(0x400105d3d), XIL(0xbfe3e0), XIL(0x4001064f8), XIL(0x4006286c0), XIL(0x400000010), XIL(0), XIL(0)} internal_args = 0xbfe4f0 #8 0x00000004001b6039 in Ffuncall (nargs=3, args=0xbfe4e8) at eval.c:2859 fun = XIL(0x4006286c5) original_fun = XIL(0x57f0) funcar = XIL(0xbfe480) numargs = 2 val = XIL(0x400cb09b3) count = 10 #9 0x00000004002063ff in exec_byte_code (bytestr=XIL(0x4003a7894), vector=XIL(0x4003a78b5), maxdepth=make_number(10), args_template=make_number(1025), nargs=4, args=0xbfeb50) at bytecode.c:633 op = 2 type = (CONDITION_CASE | CATCHER_ALL | unknown: 1074056) targets = {0x4002091dd , 0x400209200 , 0x400209202 , 0x400209204 , 0x400209206 , 0x400209206 , 0x40020926b , 0x4002092df , 0x400205d9d , 0x400205d9f , 0x400205da1 , 0x400205da3 , 0x400205da5 , 0x400205da5 , 0x400205dab , 0x400205d6c , 0x400206125 , 0x400206127 , 0x400206129 , 0x40020612b , 0x40020612d , 0x40020612d , 0x400206162 , 0x400206133 , 0x40020631d , 0x40020631f , 0x400206321 , 0x400206323 , 0x400206325 , 0x400206325 , 0x4002062d7 , 0x4002062ee , 0x4002063cf , 0x4002063d1 , 0x4002063d3 , 0x4002063d5 , 0x4002063d7 , 0x4002063d7 , 0x400206389 , 0x4002063a0 , 0x400206481 , 0x400206483 , 0x400206485 , 0x400206487 , 0x400206489 , 0x400206489 , 0x40020643b , 0x400206452 , 0x400206ced , 0x400206bc9 , 0x400206bc0 , 0x4002091dd , 0x4002091dd , 0x4002091dd , 0x4002091dd , 0x4002091dd , 0x400206f34 , 0x400207015 , 0x400207078 , 0x4002070de , 0x400207146 , 0x400205fac , 0x40020602d , 0x4002071c5 , 0x400205f1d , 0x400206095 , 0x400207233 , 0x40020729b , 0x4002072e6 , 0x40020734e , 0x4002073a0 , 0x40020746e , 0x4002074b9 , 0x400207521 , 0x4002075a9 , 0x4002075f4 , 0x40020763f , 0x4002076a7 , 0x40020770f , 0x400207777 , 0x4002077ff , 0x400207851 , 0x4002078a3 , 0x400207971 , 0x400207a06 , 0x400207a9b , 0x400207b09 , 0x400207b77 , 0x400207be5 , 0x400207c53 , 0x400207cc1 , 0x400207d13 , 0x400207da9 , 0x400207dfb , 0x400207e4d , 0x400207e9f , 0x400207fab , 0x400206a43 , 0x40020800c , 0x400208057 , 0x400208120 , 0x40020818c , 0x4002081ed , 0x400208238 , 0x40020827e , 0x4002082c4 , 0x400208312 , 0x4002091dd , 0x40020836a , 0x4002083b0 , 0x4002083f6 , 0x40020843c , 0x400208482 , 0x4002084c8 , 0x400206a43 , 0x4002091dd , 0x400208513 , 0x400208568 , 0x4002085b3 , 0x4002085fe , 0x400208666 , 0x4002086ce , 0x400208719 , 0x40020880c , 0x400208874 , 0x4002088dc , 0x400208944 , 0x40020898a , 0x4002091dd , 0x400206989 , 0x400206535 , 0x400205e8b , 0x4002065e4 , 0x400206668 , 0x4002066e9 , 0x40020693d , 0x400206952 , 0x400206284 , 0x400206a0c , 0x400206a7a , 0x400206b08 , 0x400206b4e , 0x400206d3f , 0x400206db9 , 0x400206e41 , 0x400206eae , 0x4002064ea , 0x4002089d5 , 0x400208a5d , 0x400208aa8 , 0x400208af3 , 0x400208b3e , 0x400208b89 , 0x400208bf1 , 0x400208c59 , 0x400208cc1 , 0x400208d29 , 0x400208e3a , 0x400208ea2 , 0x400208f0a , 0x400208f55 , 0x400208fbd , 0x400209025 , 0x400209070 , 0x4002090bb , 0x400207ef1 , 0x400207f43 , 0x40020910d , 0x400209175 , 0x4002091dd , 0x40020676a , 0x400206787 , 0x4002067f6 , 0x400206865 , 0x4002068d1 , 0x4002073f2 , 0x4002078f5 , 0x4002080a4 , 0x400209372 , 0x4002093e7 , 0x4002091dd , 0x4002091dd , 0x40020947d , 0x400209504 , 0x4002091dd , 0x4002091dd , 0x4002091dd , 0x4002091dd , 0x4002091dd , 0x4002091dd , 0x4002091dd , 0x4002091dd , 0x400209703 } const_length = 19 bytestr_length = 104 vectorp = 0x4003a78b8 quitcounter = 1 '\001' stack_items = 11 sa_avail = 16192 sa_count = 9 alloc = 0xbfe4b0 item_bytes = 88 stack_base = 0xbfe4b0 top = 0xbfe4e8 stack_lim = 0xbfe508 bytestr_data = 0xbfe508 "\b.\020" pc = 0xbfe525 "\nB\022\v.\001)\001\001=.," count = 9 result = XIL(0x8901b29b02530300) #10 0x00000004001b6a23 in funcall_lambda (fun=XIL(0x4003a7855), nargs=4, arg_vector=0xbfeb30) at eval.c:3060 size = 6 val = XIL(0x4001073b0) syms_left = make_number(1025) next = XIL(0xbfe8d0) lexenv = XIL(0) count = 9 i = 0 optional = false rest = false #11 0x00000004001b607d in Ffuncall (nargs=5, args=0xbfeb28) at eval.c:2861 fun = XIL(0x4003a7855) original_fun = XIL(0x99d60) funcar = XIL(0xbfe980) numargs = 4 val = XIL(0xbfe680) count = 8 #12 0x00000004001ada21 in Ffuncall_interactively (nargs=5, args=0xbfeb28) at callint.c:253 speccount = 7 #13 0x00000004001b6327 in funcall_subr (subr=0x400627f00 , numargs=5, args=0xbfeb28) at eval.c:2914 No locals. #14 0x00000004001b6039 in Ffuncall (nargs=6, args=0xbfeb20) at eval.c:2859 fun = XIL(0x400627f05) original_fun = XIL(0x6ab0) funcar = XIL(0) numargs = 5 val = XIL(0x4006ed980) count = 6 #15 0x00000004001b545a in Fapply (nargs=3, args=0xbfec00) at eval.c:2479 i = 6 numargs = 5 funcall_nargs = 6 funcall_args = 0xbfeb20 spread_arg = XIL(0) fun = XIL(0x400627f05) retval = XIL(0xbfeb80) sa_avail = 16336 sa_count = 6 #16 0x00000004001addd7 in Fcall_interactively (function=XIL(0x99d60), record_flag=XIL(0), keys=XIL(0x4007365a5)) at callint.c:340 funval = XIL(0x4003a7855) events = 1 input = XIL(0x4003a7973) speccount = 6 arg_from_tty = false key_count = 1 record_then_fail = false save_this_command = XIL(0x99d60) save_this_original_command = XIL(0x99d60) save_real_this_command = XIL(0x99d60) save_last_command = XIL(0) prefix_arg = XIL(0) enable = XIL(0) up_event = XIL(0) form = XIL(0x400c8b1e3) specs = XIL(0x400cafe43) sa_avail = 17180941629 sa_count = 12578080 string_len = 292 string = 0xbfed90 "`.." string_end = 0x4b next_event = 0 nargs = 11 args = 0x400106588 visargs = 0x400105d3d varies = 0x3ce6b60 "........\006C^+\016.\001\060\001" tem = 0xbfed60 "\220.." val = XIL(0) #17 0x00000004001b6445 in funcall_subr (subr=0x400627f40 , numargs=3, args=0xbfef60) at eval.c:2939 internal_argbuf = {XIL(0xbfee40), XIL(0x400105d3d), XIL(0xbfee50), XIL(0x4001064f8), XIL(0x400627f40), XIL(0x400000010), XIL(0), XIL(0)} internal_args = 0xbfef60 #18 0x00000004001b6039 in Ffuncall (nargs=4, args=0xbfef58) at eval.c:2859 fun = XIL(0x400627f45) original_fun = XIL(0x5caa0) funcar = XIL(0) numargs = 3 val = XIL(0x4006ed980) count = 5 #19 0x00000004002063ff in exec_byte_code (bytestr=XIL(0x4003a8944), vector=XIL(0x4003a8965), maxdepth=make_number(13), args_template=make_number(1025), nargs=1, args=0xbff470) at bytecode.c:633 op = 3 type = (CONDITION_CASE | CATCHER_ALL | unknown: 1074056) targets = {0x4002091dd , 0x400209200 , 0x400209202 , 0x400209204 , 0x400209206 , 0x400209206 , 0x40020926b , 0x4002092df , 0x400205d9d , 0x400205d9f , 0x400205da1 , 0x400205da3 , 0x400205da5 , 0x400205da5 , 0x400205dab , 0x400205d6c , 0x400206125 , 0x400206127 , 0x400206129 , 0x40020612b , 0x40020612d , 0x40020612d , 0x400206162 , 0x400206133 , 0x40020631d , 0x40020631f , 0x400206321 , 0x400206323 , 0x400206325 , 0x400206325 , 0x4002062d7 , 0x4002062ee , 0x4002063cf , 0x4002063d1 , 0x4002063d3 , 0x4002063d5 , 0x4002063d7 , 0x4002063d7 , 0x400206389 , 0x4002063a0 , 0x400206481 , 0x400206483 , 0x400206485 , 0x400206487 , 0x400206489 , 0x400206489 , 0x40020643b , 0x400206452 , 0x400206ced , 0x400206bc9 , 0x400206bc0 , 0x4002091dd , 0x4002091dd , 0x4002091dd , 0x4002091dd , 0x4002091dd , 0x400206f34 , 0x400207015 , 0x400207078 , 0x4002070de , 0x400207146 , 0x400205fac , 0x40020602d , 0x4002071c5 , 0x400205f1d , 0x400206095 , 0x400207233 , 0x40020729b , 0x4002072e6 , 0x40020734e , 0x4002073a0 , 0x40020746e , 0x4002074b9 , 0x400207521 , 0x4002075a9 , 0x4002075f4 , 0x40020763f , 0x4002076a7 , 0x40020770f , 0x400207777 , 0x4002077ff , 0x400207851 , 0x4002078a3 , 0x400207971 , 0x400207a06 , 0x400207a9b , 0x400207b09 , 0x400207b77 , 0x400207be5 , 0x400207c53 , 0x400207cc1 , 0x400207d13 , 0x400207da9 , 0x400207dfb , 0x400207e4d , 0x400207e9f , 0x400207fab , 0x400206a43 , 0x40020800c , 0x400208057 , 0x400208120 , 0x40020818c , 0x4002081ed , 0x400208238 , 0x40020827e , 0x4002082c4 , 0x400208312 , 0x4002091dd , 0x40020836a , 0x4002083b0 , 0x4002083f6 , 0x40020843c , 0x400208482 , 0x4002084c8 , 0x400206a43 , 0x4002091dd , 0x400208513 , 0x400208568 , 0x4002085b3 , 0x4002085fe , 0x400208666 , 0x4002086ce , 0x400208719 , 0x40020880c , 0x400208874 , 0x4002088dc , 0x400208944 , 0x40020898a , 0x4002091dd , 0x400206989 , 0x400206535 , 0x400205e8b , 0x4002065e4 , 0x400206668 , 0x4002066e9 , 0x40020693d , 0x400206952 , 0x400206284 , 0x400206a0c , 0x400206a7a , 0x400206b08 , 0x400206b4e , 0x400206d3f , 0x400206db9 , 0x400206e41 , 0x400206eae , 0x4002064ea , 0x4002089d5 , 0x400208a5d , 0x400208aa8 , 0x400208af3 , 0x400208b3e , 0x400208b89 , 0x400208bf1 , 0x400208c59 , 0x400208cc1 , 0x400208d29 , 0x400208e3a , 0x400208ea2 , 0x400208f0a , 0x400208f55 , 0x400208fbd , 0x400209025 , 0x400209070 , 0x4002090bb , 0x400207ef1 , 0x400207f43 , 0x40020910d , 0x400209175 , 0x4002091dd , 0x40020676a , 0x400206787 , 0x4002067f6 , 0x400206865 , 0x4002068d1 , 0x4002073f2 , 0x4002078f5 , 0x4002080a4 , 0x400209372 , 0x4002093e7 , 0x4002091dd , 0x4002091dd , 0x40020947d , 0x400209504 , 0x4002091dd , 0x4002091dd , 0x4002091dd , 0x4002091dd , 0x4002091dd , 0x4002091dd , 0x4002091dd , 0x4002091dd , 0x400209703 } const_length = 24 bytestr_length = 144 vectorp = 0x4003a8968 quitcounter = 1 '\001' stack_items = 14 sa_avail = 16128 sa_count = 5 alloc = 0xbfef20 item_bytes = 112 stack_base = 0xbfef20 top = 0xbfef58 stack_lim = 0xbfef90 bytestr_data = 0xbfef90 ".\020.?.\023" pc = 0xbfeff6 "\006\006\071.\215" count = 5 result = XIL(0xd5) #20 0x00000004001b6a23 in funcall_lambda (fun=XIL(0x4003a8915), nargs=1, arg_vector=0xbff468) at eval.c:3060 size = 5 val = XIL(0x4001073b0) syms_left = make_number(1025) next = XIL(0xbff380) lexenv = XIL(0) count = 5 i = 0 optional = false rest = false #21 0x00000004001b607d in Ffuncall (nargs=2, args=0xbff460) at eval.c:2861 fun = XIL(0x4003a8915) original_fun = XIL(0x4170) funcar = XIL(0) numargs = 1 val = XIL(0x4) count = 4 #22 0x00000004001b5a1f in call1 (fn=XIL(0x4170), arg1=XIL(0x99d60)) at eval.c:2710 No locals. #23 0x00000004001103de in command_loop_1 () at keyboard.c:1460 scount = 3 cmd = XIL(0x99d60) keybuf = {make_number(134217786), XIL(0x4001b7c89), XIL(0x80a0), XIL(0), XIL(0), XIL(0), XIL(0xbff510), XIL(0x400105d3d), XIL(0x4006ed980), XIL(0x80a0), XIL(0x80a0), XIL(0), XIL(0xbff5a0), make_number(4295417814), XIL(0), XIL(0x1), XIL(0), XIL(0), XIL(0xbff570), XIL(0x400105d3d), XIL(0x4006ed980), XIL(0x400735265), XIL(0), XIL(0), XIL(0xbff600), XIL(0x4001b2da5), XIL(0), XIL(0x4001b425c), XIL(0x3), XIL(0x4008e2303)} i = 1 prev_modiff = 8 prev_buffer = 0x400735260 already_adjusted = false #24 0x00000004001b2898 in internal_condition_case (bfun=0x40010fa8c , handlers=XIL(0x56a0), hfun=0x40010f07f ) at eval.c:1373 val = XIL(0x3e13980) c = 0x3e13b10 #25 0x000000040010f70e in command_loop_2 (ignore=XIL(0)) at keyboard.c:1088 val = XIL(0xbff740) #26 0x00000004001b2163 in internal_catch (tag=XIL(0xddd0), func=0x40010f6dc , arg=XIL(0)) at eval.c:1136 val = XIL(0) c = 0x3e13980 #27 0x000000040010f661 in command_loop () at keyboard.c:1067 No locals. #28 0x0000000000000000 in ?? () No symbol table info available. Backtrace stopped: previous frame inner to this frame (corrupt stack?) Lisp Backtrace: "directory-files" (0xbfe220) "eval" (0xbfe4f0) "eval-expression" (0xbfeb30) "funcall-interactively" (0xbfeb28) "call-interactively" (0xbfef60) "command-execute" (0xbff468) In GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32) of 2018-12-27 built on MACHINE Repository revision: 091450811b983a8cdd765c25eb347238d9a4c633 Repository branch: master Windowing system distributor 'Microsoft Corp.', version 10.0.17134 System Description: Microsoft Windows 10 Pro (v10.0.1803.17134.472) Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --config-cache --with-modules --without-pop 'CFLAGS=-O0 -ggdb3'' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND DBUS NOTIFY W32NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON LCMS2 GMP Important settings: value of $EMACSLOADPATH: c:\emacs-lisp; value of $LANG: ENG locale-coding-system: cp1252 Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-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 line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars 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 w32notify dbusbind w32 lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 97661 8419) (symbols 48 20104 2) (strings 32 29901 1657) (string-bytes 1 767964) (vectors 16 14409) (vector-slots 8 500781 9836) (floats 8 53 310) (intervals 56 214 0) (buffers 992 10))