summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/regexp-opt.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2024-07-20 00:17:14 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2024-07-20 00:19:33 -0700
commit79b9f05d3a44b25db9fd3eff9cc002324cfa790c (patch)
tree0aad9dcb93934de2496293ce8d87c8a1c7ca1a12 /lisp/emacs-lisp/regexp-opt.el
parentcb78b43f39432af3301a39507eac23f5f1e9fbf3 (diff)
downloademacs-79b9f05d3a44b25db9fd3eff9cc002324cfa790c.tar.gz
emacs-79b9f05d3a44b25db9fd3eff9cc002324cfa790c.tar.bz2
emacs-79b9f05d3a44b25db9fd3eff9cc002324cfa790c.zip
Avoid accessing uninitialized bool_vector words
Although loading uninitialized works from memory and then ignoring the result works fine on conventional architectures, it technically has undefined behavior in C, so redo bool_vector allocation so that the code never does that. This can improve performance when allocating large vectors of nil, since calloc can clear the memory lazily. * src/alloc.c (make_clear_bool_vector): New function, a generalization of make_uninit_bool_vector. (make_uninit_bool_vector): Use it. (Fmake_bool_vector): If !INIT, rely on make_clear_bool_vector. * src/alloc.c (Fbool_vector): * src/fns.c (Freverse): Don’t access uninitialized bool_vector words.
Diffstat (limited to 'lisp/emacs-lisp/regexp-opt.el')
0 files changed, 0 insertions, 0 deletions