-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Segfault when wrapping an anon obj in more than one layer #718
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
Comments
Poking around in gdb reveals that a forwarding fn is being called in an infinite loop. Two forwarding fns are being generated. In the executable I'm looking at now, the one for my_b.foo() is called forwarding_fn1 and the one for my_c.foo() is forwarding_fn13. First, the call to my_b.foo() takes us to forwarding_fn1, which takes us to my_a.foo(). This works fine. Then, the call to my_c.foo() takes us to forwarding_fn13, which takes us to fowarding_fn1. But then we get stuck on forwarding_fn1. So, we don't always get stuck on forwarding_fn1. We only seem to get stuck when we arrive at it via another forwarding fn. We call my_c.foo(); my_c protests and says "oh, no, I'm not self, my_b is!"; we head to my_b.foo(), but since my_c has already insisted that my_b is self, we don't hear my_b telling us that actually my_a is self. I'll look at this some more when I get a chance to talk about it with graydon. |
Co-Authored-By: William S. Moses <[email protected]>
Co-authored-by: Adrian Palacios <[email protected]>
The call to
my_c.foo()
in this program segfaults:The text was updated successfully, but these errors were encountered: