Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assert if name demangling fails #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

assert if name demangling fails #57

wants to merge 1 commit into from

Conversation

PeterHajdu
Copy link
Contributor

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?

@ThePhD
Copy link
Contributor

ThePhD commented Oct 30, 2014

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?).

@PeterHajdu
Copy link
Contributor Author

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.

@PeterHajdu
Copy link
Contributor Author

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

@PeterHajdu
Copy link
Contributor Author

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 :)

@ThePhD
Copy link
Contributor

ThePhD commented Nov 3, 2014

I failed to reproduce the crash. That is, it works for me with gcc 4.8 and 4.9. Have yet to try clang.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants