[tex-live] Bug?: pdflatex hangs with self-referential \newcommand{\bad}{\bad} definition

David Carlisle d.p.carlisle at gmail.com
Wed Jan 9 16:58:18 CET 2019


In any non trivial programming language it is possible code an
infinite loop that can not be caught (other than by external means
such as a time limit on the job)

So this is by design, tex does not trace how many expansions it is
doing, and as that particular expansion is tail recursive you do not
fill up the stack so it loops forever, there is no way to trap that in
latex, it would require changes to the tex binary, also how many loop
constructs would you want to trap? This plain tex document also loops

\let\par\relax x\vfill


David


More information about the tex-live mailing list