View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000773 | luatex | luatex bug | public | 2012-09-23 22:04 | 2013-03-21 09:19 |
Reporter | oberdiek | Assigned To | Taco | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | i386-linux | ||||
Product Version | 0.70.1 | ||||
Summary | 0000773: Undefined "\csname\endcsname" crashes after \if or \ifcat | ||||
Description | I have received a bug report for hyperref and could strip it down to a bug in LuaTeX. The following token sequence (tokens in angle brackets): <\if> <\noexpand> <\csname\endcsname> crashes, if the third token <\csname\endcsname> is undefined. That token is created by \csname and \endcsname without tokens inbetween. Also it is needed to get rid of the side effect of \csname that an undefined command is defined with meaning \relax: \begingroup\expandafter\endgroup \expandafter\if\expandafter\noexpand\csname\endcsname\relax\fi In LuaTeX 0.70.1-2011061416 (rev 4277) of TeX Live (i386-linux) the result is a crash, output of gdb: | Program received signal SIGSEGV, Segmentation fault. | 0x0814cf40 in conditional () The segmentation fault is also triggered by using \ifcat instead of \if. | ||||
Steps To Reproduce | Run the test file through LuaTeX: $ luatex --ini test %%% test.tex %%% \catcode`\{=1 \catcode`\}=2 \begingroup\expandafter\endgroup \expandafter\if\expandafter\noexpand\csname\endcsname\relax\fi \csname @@end\endcsname\end %%% test.tex %%% | ||||
Additional Information | An older version 0.60.2-2010071421 (Web2C 2010) (rev 3736) (MiKTeX 2.9) generates an error instead: | ! Emergency stop. | <recently read> \notexpanded: \csname\endcsname | | l.5 ...er\if\expandafter\noexpand\csname\endcsname | \relax\fi The following workaround avoids an undefined \csname\endcsname token by giving it the meaning \relax without unnecessary execution of the token: \expandafter\ifx\csname\endcsname\relax\fi | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2012-09-23 22:04 | oberdiek | New Issue | |
2012-09-23 22:04 | oberdiek | File Added: a.txt | |
2012-09-23 22:12 | oberdiek | Note Added: 0000958 | |
2012-12-13 15:31 | Taco | Status | new => resolved |
2012-12-13 15:31 | Taco | Resolution | open => fixed |
2012-12-13 15:31 | Taco | Assigned To | => Taco |
2013-03-21 09:19 | Taco | Status | resolved => closed |