[luatex] double free noded

Taco Hoekwater taco at elvenkind.com
Wed Jun 29 15:07:47 CEST 2011



On 06/29/11 09:46, Patrick Gundlach wrote:
> Hi,
> 
> can someone explain this behavior to me?

Eh, yes. But is it intuitive?  no, not really. So, for
explanations only:

> tmp = node.vpack(tex.box[666])
> tex.box[777] = tmp
> 
> tex.shipout(777)

The tex.shipout() frees `tmp`, which also contains box[666].

> local r1 = node.new("rule")
> r1.width = 2* tenpt
> r1.height = tenpt
> r1.depth = tenpt
> local tmp = node.vpack(r1)
> 
> -- to make sure it's this box that is double freed:
> -- print(tostring(tex.box[666])) 
> 
> tex.box[666] = tmp

This again frees box[666], now to make room for the new
`tmp`. (but it is already freed).



More information about the luatex mailing list