summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/checkdoc.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2019-07-31 11:19:39 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2019-07-31 11:19:39 -0400
commitbedcc2d87bde06482ccdc31ac7f428cbde34ced5 (patch)
tree910a94845677f276e95fcc2ea0428ab951741d6d /lisp/emacs-lisp/checkdoc.el
parent495d0667fcf4df9f10c261684162c64f08aadd71 (diff)
downloademacs-bedcc2d87bde06482ccdc31ac7f428cbde34ced5.tar.gz
emacs-bedcc2d87bde06482ccdc31ac7f428cbde34ced5.tar.bz2
emacs-bedcc2d87bde06482ccdc31ac7f428cbde34ced5.zip
* src/lread.c (infile): Set/reset it like a dynamically scoped variable
I've seen segfaults where `infile` is nil when we get to readbyte_from_file, presumably because Fload set it to NULL (via close_infile_unwind) just before returning to its caller which was probably itself within another read/load and for some reason readevalloop didn't get to re-set `infile` like it used to do at every iteration. I was not able to really track down the bug, but the way `infile` was set/reset seemed fragile and managing it like a standard dynamically-scoped var seems both safer (and more efficient since we don't need readevalloop to constantly re-set it). (readchar): Assert that `infile` is set if using a function the depends on it. (readbyte_from_file): Assert that `infile` is set. (close_infile_unwind): Reset `infile` to its previous value rather than to NULL. (Fload): Remember the previous value of `infile` before chaning it. (readevalloop): Don't set `infile` any more.
Diffstat (limited to 'lisp/emacs-lisp/checkdoc.el')
0 files changed, 0 insertions, 0 deletions