diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2025-06-03 21:04:16 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2025-06-03 21:04:16 -0700 |
commit | 2fe9953ab7d7938d491e13558a90d493a2dfae7d (patch) | |
tree | b1366dcb26ba3c630f536fb94706022c798c655d | |
parent | e96306e75ac59393ab051ca4a85e12533f64d9d6 (diff) | |
download | txr-2fe9953ab7d7938d491e13558a90d493a2dfae7d.tar.gz txr-2fe9953ab7d7938d491e13558a90d493a2dfae7d.tar.bz2 txr-2fe9953ab7d7938d491e13558a90d493a2dfae7d.zip |
listener: ignore_eof_count must be volatile.
* parser.c (repl): Due to the longjmp-like non-local control
transfers taking place, ignore_eof_count must be volatile.
The reason is that we change it after saving the context,
and then examine it after catching an exception. I'm seeing it
have a bad value after an exception is caught, resulting in
the ** EOF ignored by user preference" even though I
configured an integer value.
-rw-r--r-- | parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1688,7 +1688,7 @@ val repl(val bindings, val in_stream, val out_stream, val env) val rw_f = func_f1v(out_stream, repl_warning); val saved_dyn_env = set_dyn_env(make_env(nil, nil, dyn_env)); val brackets = mkstring(num_fast(repl_level), chr('>')); - val ignore_eof_count = nil; + volatile val ignore_eof_count = nil; cnum i; env_vbind(dyn_env, stderr_s, out_stream); |