[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: another crash bug in lua5.1work6
- From: "Alex Evans" <aevans@...>
- Date: Thu, 16 Jun 2005 00:19:05 +0100
well actually probably the same one with a different repro but... this time it isn't a syntax error.
I know this is going to sound like I'm obsessing over threads, but honestly I'm not....
has anyone else found that by attempting to cast a thread (returned from coroutine.create) to a string, it crashes (core dump) lua work 6?
the repro is something like
c=coroutine.create(f) -- f any function
I'm not by any stretch of the imagination familiar with the lua VM, but I did some digging this time.
it crashes eventually in luaH_getstr() - trying to extract the __tostring field from the thread's metatable.
I'm afraid that's as far as I've got - I presume this (and the other bug relating to trying to '__call' a thread) are in fact the same bug and it is simply a side effect of the slightly unfinished implementation of all-types-can-have-metatables. or maybe its a side effect of me being dumb! in which case, apologies.
anyway, if anyone can suggest a patch for this it would be handy because I'd vaguely like to be able to do a __tostring on a thread...