[tex-k] LaTeX segfaults with source specials and space in filename

Thomas Esser te at dbs.uni-hannover.de
Sat Jan 10 22:17:04 CET 2004


> > You don't mention what version gets the seg fault.
> Excuse me - it's the current stable tetex version:

Some more information:

(gdb) run -progname=latex --src-specials '\nonstopmode\input{foo bar.tex}'
Starting program: /build/X/texk/web2c/tex -progname=latex --src-specials '\nonstopmode\input{foo bar.tex}'
This is TeXk, Version 3.14159 (Web2C 7.4.5)
 Source specials enabled.
LaTeX2e <2001/06/01>
Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, n
ohyphenation, loaded.


Program received signal SIGSEGV, Segmentation fault.
gettexstring (s=1075284316) at texextra.c:1536
1536      len = strstart[s + 1] - strstart[s];
(gdb) bt
#0  gettexstring (s=1075284316) at texextra.c:1536
#1  0x0807a1c3 in isnewsource (srcfilename=1075284316, lineno=0) at texextra.c:1554
#2  0x08075f17 in insertsrcspecial () at tex2.c:1801
#3  0x08071323 in znewgraf (indented=1) at tex1.c:8843
#4  0x08076abf in maincontrol () at tex2.c:2364
#5  0x080534d5 in mainbody () at texini.c:4151
#6  0x0807873b in main (ac=4, av=0xbffff5a4) at texextra.c:292
#7  0x40059ca6 in __libc_start_main (main=0x8078720 <main>, argc=4, ubp_av=0xbffff5a4, init=0x8083630 <__libc_csu_init>, 
    fini=0x8083660 <__libc_csu_fini>, rtld_fini=0x400158c0 <_rtld_local>, stack_end=0x40a73008) at ../sysdeps/generic/libc-start.c:152

Using etex:

$ ./etex -progname=elatex --src-specials '\nonstopmode\input{foo bar.tex}'
This is e-TeXk, Version 3.14159-2.1 (Web2C 7.4.5)
 Source specials enabled.
entering extended mode
LaTeX2e <2001/06/01>
Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, n
ohyphenation, loaded.


! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
<*> \nonstopmode\input{foo bar.tex}
                                   
Missing character: There is no b in font nullfont!
Missing character: There is no a in font nullfont!
Missing character: There is no r in font nullfont!
Missing character: There is no . in font nullfont!
Missing character: There is no t in font nullfont!
Missing character: There is no e in font nullfont!
Missing character: There is no x in font nullfont!

! LaTeX Error: File `foo bar.tex' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: tex)

Enter file name: 
! Emergency stop.
<read *> 
         
<*> \nonstopmode\input{foo bar.tex}
                                   ^^M
No pages of output.
Transcript written on texput.log.

Interestingly, there are substantial differences when not using the
latex format:

$ ./etex --src-specials '\nonstopmode\input{foo bar.tex}'
This is e-TeXk, Version 3.14159-2.1 (Web2C 7.4.5)
 Source specials enabled.
entering extended mode

! I can't find file `{foo'.
<*> \nonstopmode\input{foo 
                           bar.tex}
Please type another input file name
! Emergency stop.
<*> \nonstopmode\input{foo 
                           bar.tex}
No pages of output.
Transcript written on texput.log.

$ ./tex --src-specials '\nonstopmode\input{foo bar.tex}'
This is TeXk, Version 3.14159 (Web2C 7.4.5)
 Source specials enabled.

! I can't find file `{foo'.
<*> \nonstopmode\input{foo 
                           bar.tex}
Please type another input file name
! Emergency stop.
<*> \nonstopmode\input{foo 
                           bar.tex}
No pages of output.
Transcript written on texput.log.

Thomas


More information about the tex-k mailing list