On Tue, Apr 2, 2019 at 9:48 PM Reinhard Kotucha <reinhard.kotucha@web.de> wrote:
On 2019-04-02 at 08:50:23 +0200, luigi scarso wrote:

 > On Tue, Apr 2, 2019 at 7:18 AM luigi scarso <luigi.scarso@gmail.com> wrote:
 >
 >     On Tue, Apr 2, 2019 at 12:23 AM Reinhard Kotucha <
 >     reinhard.kotucha@web.de> wrote:
 >   
 >         Hi,
 >         when I run the example on page 261/262 of the LuaTeX Manual and the
 >         input file ("foo.pdf" in the example) doesn't exist, I get
 >       
 >           Segmentation fault (core dumped)
 >       
 >         on x86_64-linux.
 >
 >  
 > This is ok
 > $ luatex --fmt=luatex-plain  "test-plain.tex"

Hi Luigi,
this works here too.  I get:

  This is LuaTeX, Version 1.10.0 (TeX Live 2019)
  restricted system commands enabled.
  (./testpdfscanner.tex
  warning  (pdfe lib): no valid pdf file 'foo.pdf'
  )
  (see the transcript file for additional information)
  warning  (pdf backend): no pages of output.
  Transcript written on testpdfscanner.log.


I suppose that texlua crashes when trying to print the warning, see
gdb output below.  What I don't understand is is why luatex and
texlua behave differently here.


because the print of the warning requires a TeX state. texlua has only a Lua state.

 

--
luigi