lua-users home
lua-l archive

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


On 20 April 2013 10:17, steve donovan <steve.j.donovan@gmail.com> wrote:
I noticed this some time ago, but note that the issue still happens (checked with Mint 14 and clang version 3.0-6ubuntu3).

clang version 3.0.6 is rather old, have you tried any newer version? 

Basically there's a miscompile of the io library which leads to Lua unable to actually close a file handle.  It's related to the change in how file objects are internally structured?

Is there a code that is supposed to fail? I have tried running the following code and everything seems OK. Compiled with clang 3.3 (compiled some time ago from the repository).

local f = io.open("text.lua")
print(f) --> file (0x19460b0)
f:close()
print(f) --> file (closed)
 
I haven't seen any sign of this being a problem. with the clang that comes with OS X, so perhaps a Linux issue?

As far as I know, clang on Mac OS X is at least 3.1. Try installing a newer clang from a PPA, e.g. [1]. You can later purge the whole PPA with PPA-Purge.

[1] https://launchpad.net/~h-rayflood/+archive/llvm
[2] http://hackedbellini.org/applications/ppa-purge-the-best-friend-for-people-who-lives-on-bleeding-edge/