lua-users home
lua-l archive

Using file metatable, cause segfault

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


batrick@menzoberranzan:~$ lua
Lua 5.1.3 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> mt = getmetatable(io.stdin)
> p = newproxy()
> debug.setmetatable(p, mt)
> p:read()
Segmentation fault (core dumped)
I don't really feel it's a bug as someone with access to the debug
interface should be responsible and not do things this stupid, but I
thought I'd throw this out there...
-- 
-Patrick Donnelly
"One of the lessons of history is that nothing is often a good thing
to do and always a clever thing to say."
-Will Durant

AltStyle によって変換されたページ (->オリジナル) /