-
-
Notifications
You must be signed in to change notification settings - Fork 639
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
Protect against circular type forwarders #806
base: master
Are you sure you want to change the base?
Protect against circular type forwarders #806
Conversation
If we have two assemblies with type forwarders that point to each other, we enter an infinite loop and a stack overflow. This breaks the cycle by detecting reentrancy. Fixes jbevain#706
655d831
to
5ad5672
Compare
@jbevain I even added a test! |
@jbevain What can community contributors do to get this PR merged and released? This resolves a bug that my team encountered. |
FYI @jbevain adding the boolean field is free because of alignment padding: |
Unfortunately it's not free for 32-bit (the size goes from 32 to 36 bytes. But there are not many exported types per assembly, so it's honestly negligible.
|
We've been running into these same stack overflow issues quite a bit but intermittently and not related to circular type forwarders (from what I can tell). I have confirmed this fixes our issues as well, so it'd be nice to have it included in an official release. |
If we have two assemblies with type forwarders that point to each other, we enter an infinite loop and a stack overflow.
This breaks the cycle by detecting reentrancy.
Fixes #706