[luatex] Fatal error with attr keyword to \hbox or \vbox

Esger Renkema esgerrenkema at gmail.com
Tue Oct 6 22:21:43 CEST 2020


Dear list,

Using the attr keyword with \hbox or \vbox will cause a fatal error when no
other (any other) attribute has been set before.

For example, the file

-----------------------------------------------------------
\attribute 1 = 1
\hbox attr 2 = 2{}
\bye
-----------------------------------------------------------

compiles without problems, while

-----------------------------------------------------------
\hbox attr 2 = 2{}
\bye
-----------------------------------------------------------

gives the following result:

-----------------------------------------------------------
This is LuaTeX, Version 1.12.0 (TeX Live 2020/Debian)
  restricted system commands enabled.
(./bug.tex
! error:  (nodes): trying to set an attribute fails, case 1
!  ==> Fatal error occurred, no output PDF file produced!
-----------------------------------------------------------

The cause of this problem problem lies in the do_set_attribute function
defined in texnodes.c: it expects an ‘attr list head, or zero’ but receives
(and tries to return!) an attribute list node instead.

The attached patch seems to solve the issue.

Regards,
Esger Renkema

-------------- next part --------------
A non-text attachment was scrubbed...
Name: attr.diff
Type: text/x-diff
Size: 3701 bytes
Desc: not available
URL: <https://tug.org/pipermail/luatex/attachments/20201006/530f2f38/attachment.bin>


More information about the luatex mailing list.