summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/tex.ch
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-07-06 22:42:47 +0000
committerKarl Berry <karl@freefriends.org>2020-07-06 22:42:47 +0000
commit1eef92044ea0ed10907df5c2834e52d70a196154 (patch)
tree4384713145b0be21d18853952d07a40306425901 /Build/source/texk/web2c/tex.ch
parentdb118169e8feb0f467c6fa1c23cce13ea65afac1 (diff)
avoid seg fault in unusual interaction sequence
git-svn-id: svn://tug.org/texlive/trunk@55767 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/tex.ch')
-rw-r--r--Build/source/texk/web2c/tex.ch21
1 files changed, 20 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/tex.ch b/Build/source/texk/web2c/tex.ch
index 55ffc95aa32..9d8b48b98dc 100644
--- a/Build/source/texk/web2c/tex.ch
+++ b/Build/source/texk/web2c/tex.ch
@@ -853,7 +853,26 @@ if (halt_on_error_p) then begin
end;
@z
-@x [6.84] l.1888 - Implement the switch-to-editor option.
+% Original reports:
+% https://tex.stackexchange.com/questions/551313/
+% https://tug.org/pipermail/tex-live/2020-June/045876.html
+%
+% This will probably be fixed by DEK in the 2021 tuneup in a different
+% way (so we'll have to remove or alter this change), but the interaction
+% sequence in the reports above causes a segmentation fault in web2c -
+% writing to the closed \write15 stream because we wrongly decrement
+% selector from 16 to 15 in term_input, due to the lack of this check in
+% a recursive error() call.
+%
+@x [6.83] l.1893 - avoid wrong interaction
+loop@+begin continue: clear_for_error_prompt; prompt_input("? ");
+@y
+loop@+begin continue:
+if interaction<>error_stop_mode then return;
+clear_for_error_prompt; prompt_input("? ");
+@z
+
+@x [6.84] l.1904 - Implement the switch-to-editor option.
line ready to be edited. But such an extension requires some system
wizardry, so the present implementation simply types out the name of the
file that should be