View Issue Details

IDProjectCategoryView StatusLast Update
0000907luatexluatex bugpublic2015-03-21 14:58
ReporterTaco Assigned ToTaco  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Summary0000907: lua adjustments to the save stack inside the packing filter affect box packaging
Description
Something like this:

\directlua{
 callback.register('vpack_filter',
   function(h)
     tex.set('vbadness', 2000)
     return h
   end
 )
}


adds an entry to the save stack at a point in time where that was not possible in TeX82. The result is that
the packaging routine crashes in this bit of Aleph code in packaging.w:

    if (saved_value(2) != null) {
        /* DIR: Adjust back |text_dir_ptr| for |scan_spec| */
        flush_node_list(text_dir_ptr);
        text_dir_ptr = saved_value(2);
    }

Should be simple to fix ....
Steps To ReproduceOriginal report:

Hello,

When I processed the following source (test1.tex) by LuaTeX rev 5021,
I got "assertion failed" error:

----
%#!luatex
\directlua{
 callback.register('vpack_filter',
   function(h)
     tex.set('vbadness', 2000)
     return h
   end
 )
}

\vbox{}
\bye
----
$ luatex test1
This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/dev) (rev 5021)
restricted \write18 enabled.
(./test1.texluatex: ../../../source/texk/web2c/luatexdir/tex/texnodes.w:1022: free_error: Assertion `p> my_prealloc' failed.
----

Is it dangerous to assign internal parameters of TeX
in a callback, as in test1.tex above?


Regards
Hironori KITAGAWA
TagsNo tags attached.

Activities

Taco

2014-06-18 10:24

administrator   ~0001274

Fixed the assertion failure in the trunk, but it is a bit of a strange thing to do : the tex.set() from the example is functionally equivalent to this non-callback code:

   \vbox{}
   \vbadness2000
   \bye

Issue History

Date Modified Username Field Change
2014-06-18 10:14 Taco New Issue
2014-06-18 10:22 Taco Assigned To => Taco
2014-06-18 10:22 Taco Status new => assigned
2014-06-18 10:24 Taco Note Added: 0001274
2014-06-18 10:24 Taco Status assigned => resolved
2014-06-18 10:24 Taco Resolution open => fixed
2015-03-21 14:58 Hans Hagen Status resolved => closed