lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I have only witnessed this problem second-hand, but it would appear
that Lua io routines sometimes have trouble reading the whole file on
some platforms, both with f:read("*a") or by iterating over f:lines().

More specifically, in my program I have a script that tries to parse 
exported functions from C source at build time, and at least two users
have reported it fail on their systems because some data is missing. 
Because it is a simple data-processing script that always gets fed the
same data  independent of the platform, I suspected the problem would be
in Lua. Indeed, remote-debugging with the second user who reported this 
problem, it would appear that Lua consistently fails to read some files 
in full when processing multiple files with the script. If the script is
run only on single files, everything works ok.

The first of the users who reported this problem was running SunOS and
the second OpenBSD 3.4 with gcc 3.3.2 and both Lua 5.0 and 5.0.1.

I don't have a simple test case to show, as none of the systems I have
access to seem to have any problems and I didn't want to bother the
user with trying to find a test program. But if it is of any help, the
script that has problems is mkexports.lua in Ion2 available at
<http://iki.fi/tuomov/ion>.

-- 
Tuomo