diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2022-04-17 01:06:46 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2022-04-17 01:08:21 -0700 |
commit | 4641bc1c550a81c71798c0176a6bfc34c8947c74 (patch) | |
tree | 656aa67a529748a6ad1b5282c5c7794adfda98c7 /lisp/emacs-lisp/trace.el | |
parent | 1c495aff71fc798b7b9663c3a35055badafded97 (diff) | |
download | emacs-4641bc1c550a81c71798c0176a6bfc34c8947c74.tar.gz emacs-4641bc1c550a81c71798c0176a6bfc34c8947c74.tar.bz2 emacs-4641bc1c550a81c71798c0176a6bfc34c8947c74.zip |
Fix GC bug in filelock.c
Fix a bug where if GC occurred at the wrong moment when locking a
file, the lock file’s name was trashed so file locking did not work.
This bug was introduced in Emacs 28.1. The bug sometimes caused
filelock-tests-detect-external-change test failures on Fedora 35
x86-64 in an en_US.utf8 locale.
* src/filelock.c (lock_file_1, current_lock_owner, lock_if_free)
(lock_file, unlock_file, Ffile_locked_p):
Use Lisp_Object, not char *, for string, so that GC doesn’t trash
string contents.
(make_lock_file_name): Return the encoded name, not the original.
All callers changed.
Diffstat (limited to 'lisp/emacs-lisp/trace.el')
0 files changed, 0 insertions, 0 deletions