[tex-k] LaTeX segfaults with source specials and space in filename
Olaf Weber
olaf at infovore.xs4all.nl
Sun Jan 11 13:33:05 CET 2004
Thomas Esser writes:
>>> latex --src-specials '\nonstopmode\input{foo bar.tex}'
>>> You don't mention what version gets the seg fault.
> Oh, well, I get it (if I really use tex and not etex):
> $ tex -ini -progname=latex latex.ini
> ...
> $ tex -progname=latex --src-specials '\nonstopmode\input{foo bar.tex}'
> This is TeXk, Version 3.14159 (Web2C 7.5.2)
> Source specials enabled.
> LaTeX2e <2001/06/01>
> Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, n
> ohyphenation, loaded.
> Segmentation fault
All TeX engines suffer from this bug. Whether it is triggered on any
specific run depends on the format being used, and possibly other
factors as well. The cause is the use of unitialized data if the
src_specials code is triggered without any input file having been
opened.
infovore:/home/olaf/web2c/src/texk/texk/web2c$ cvs diff -u -r1.55 -r1.56 tex.ch
Index: tex.ch
===================================================================
RCS file: /usr/local/cvsroot/texk/texk/web2c/tex.ch,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- tex.ch 11 Jan 2004 12:23:31 -0000 1.55
+++ tex.ch 11 Jan 2004 12:27:34 -0000 1.56
@@ -1502,6 +1502,13 @@
{token list pointers for parameters}
@z
+ at x [23.331] l.7071 - init source file name stacks
+begin input_ptr:=0; max_in_stack:=0;
+ at y
+begin input_ptr:=0; max_in_stack:=0;
+source_filename_stack[0]:=0;full_source_filename_stack[0]:=0;
+ at z
+
@x [24.338] l.7164 - i18n fix
print(" while scanning ");
@y
--
Olaf Weber
(This space left blank for technical reasons.)
More information about the tex-k
mailing list