[Dev-luatex] .BEILMOPS or how I stopped worrying and love Open Source

Jonathan Sauer Jonathan.Sauer at silverstroke.com
Wed Dec 12 09:03:37 CET 2007


Hello,

> Perhaps the IMPOSSSIBLE. error was just a side-effect of another bug
> that is already fixed (that is possible, and not even all 
> that unlikely, as there were some "uninitialized memory" errors
> in 0.20.0) or possibly the behaviour depends on the used
> texmf.cnf and/or architecture (also possible, but those would be bad).

Well, the bad news is: The bug is still in the trunk as of yesterday
morning/noon.

The good news is: I narrowed down the problem to a simple format and
a simple test file (attached):

1.	Create the format `weird_format' using this command line:

	luatex --fmt=weird_format --ini --jobname=weird_format
weird_format


2.	Typeset 'weird_plain.tex' using this format:

	luatex --fmt=weird_format weird_plain


3.	Observe the result:

	luatex --fmt=weird_format weird_plain
	This is LuaTeX, Version snapshot-0.20.1-2007121117 (Web2C 7.5.6)
	(weird_plain.tex
	[A][1 = elem  2 = sep  3 = elem  4 = sep  ]
	00: call -> 2
	01: jmp -> 51
	02: opencapture table(n = 0) (0)
	03: call -> 10
	04: choice -> 8 (0)
	05: call -> 41
	06: call -> 10
	07: partial_commit -> 5
	08: closecapture close(n = 0) (0)
	09: ret 
	10: span [(0a)(20)(2e)(42)(45)(49)(4c-4d)(4f-50)(53)]
	19: opencapture simple(n = 0) (0)
	20: choice -> 23 (0)
	21: call -> 41
	22: failtwice 
	23: any * 1
	24: choice -> 30 (0)
	25: choice -> 28 (0)
	26: call -> 41
	27: failtwice 
	28: any * 1
	29: partial_commit -> 25
	30: closecapture close(n = 0) (0)
	31: span [(0a)(20)(2e)(42)(45)(49)(4c-4d)(4f-50)(53)]
	40: ret 
	41: set [(2c)(7b)(7d)]
	50: ret 
	51: end 
	 (undefined) (macro:#1->) [0] )
	Output written on weird_plain.dvi (1 page, 144 bytes).
	Transcript written on weird_plain.log


4.	Change \unexpanded to \detokenize and observe:

	luatex --fmt=weird_format weird_plain
	This is LuaTeX, Version snapshot-0.20.1-2007121117 (Web2C 7.5.6)
	(weird_plain.tex
	[A]
	[B]
	[C]
	[D]
	[E]
	[F][1 = elem  2 = sep  3 = elem  4 = sep  ]
	00: call -> 2
	01: jmp -> 51
	02: opencapture table(n = 0) (0)
	03: call -> 10
	04: choice -> 8 (0)
	05: call -> 41
	06: call -> 10
	07: partial_commit -> 5
	08: closecapture close(n = 0) (0)
	09: ret 
	10: span [(09-0a)(20)]
	19: opencapture simple(n = 0) (0)
	20: choice -> 23 (0)
	21: call -> 41
	22: failtwice 
	23: any * 1
	24: choice -> 30 (0)
	25: choice -> 28 (0)
	26: call -> 41
	27: failtwice 
	28: any * 1
	29: partial_commit -> 25
	30: closecapture close(n = 0) (0)
	31: span [(09-0a)(20)]
	40: ret 
	41: set [(2c)(7b)(7d)]
	50: ret 
	51: end 
	 (undefined) (macro:#1->) [0] )
	Output written on weird_plain.dvi (1 page, 144 bytes).
	Transcript written on weird_plain.log.


5.	Wonder why a .dvi file is created, even though there is no
output ;-)


6.	Try running weird_initex.tex in IniTeX:

	luatex --ini --jobname=weird_initex weird_initex
	This is LuaTeX, Version snapshot-0.20.1-2007121117 (Web2C 7.5.6)
(INITEX)
	(weird_initex.tex
	[A]
	[B]
	[C]
	[D]
	[E]
	[F][1 = elem  2 = sep  3 = elem  4 = sep  ]
	00: call -> 2
	01: jmp -> 51
	02: opencapture table(n = 0) (0)
	03: call -> 10
	04: choice -> 8 (0)
	05: call -> 41
	06: call -> 10
	07: partial_commit -> 5
	08: closecapture close(n = 0) (0)
	09: ret 
	10: span [(09-0a)(20)]
	19: opencapture simple(n = 0) (0)
	20: choice -> 23 (0)
	21: call -> 41
	22: failtwice 
	23: any * 1
	24: choice -> 30 (0)
	25: choice -> 28 (0)
	26: call -> 41
	27: failtwice 
	28: any * 1
	29: partial_commit -> 25
	30: closecapture close(n = 0) (0)
	31: span [(09-0a)(20)]
	40: ret 
	41: set [(2c)(7b)(7d)]
	50: ret 
	51: end 
	 (undefined) (macro::ifFileIncluded#1->:ifFileIncluded) [0] )
	Output written on weird_initex.dvi (1 page, 144 bytes).
	Transcript written on weird_initex.log.


7.	Play with the two commented 'introductions' of \t in
weird_format.tex
	(since '\t' is only introduced, not defined there).


So: The problem only manifests itself, if '\t' is not in TeX's cs hash
table when '\FM:ifFileIncluded' is defined, and if '\FM:ifFileIncluded'
is
defined in the format.

Hypothesis: A bug during format dumping/loading.

@Taco: If you cannot reproduce the bug, maybe it is an issue with
endianness: Intel processors use little endian, while PPCs (used in
the old macs) use big endian.


> Best wishes,
> Taco

Jonathan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Taco-20071211.zip
Type: application/x-zip-compressed
Size: 3985 bytes
Desc: Taco-20071211.zip
Url : http://www.ntg.nl/mailman/private/dev-luatex/attachments/20071212/0239f17e/attachment-0001.zip 


More information about the dev-luatex mailing list