-
-
Notifications
You must be signed in to change notification settings - Fork 640
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # 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. |
@KirillOsenkov just move the field with the other fields and this is good to go :) |
It's happening.gif |
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