Open PeterHajdu opened 10 years ago
Curiously enough, has the demangling ever actually failed? Not that this will affect if this should be accepted or not, I'm just genuinely curious (e.g. under which conditions would this happen. Maybe no RTTI or something?).
Unfortunately it did, and I even had rtti. To be honest, it was some time before and I do not remember the actual case, but I'll try to reproduce it.
namespace
{
class a
{
public:
a()
{
sol::state lua;
lua.set_function( "foo", [ this ]() {} );
lua.script( "foo()" );
}
};
}
This segfaults when I instantiate a. I think it works even without the unnamed namespace the key is the captured "this".
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610 Target: x86_64-unknown-freebsd10.0 Thread model: posix
Sorry to bother you, I don't want to be pushy. Did you manage to reproduce the crash? Or did I misunderstand something? Please correct me if I made a mistake here. I'm just as much curious as you are :)
I failed to reproduce the crash. That is, it works for me with gcc 4.8 and 4.9. Have yet to try clang.
I'm not sure if this is the best way to handle demangling failure, but it should save a few minutes of debugging. Is there a graceful solution?