-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Respect "getBypassResilience" on "isResilient" #78537
base: main
Are you sure you want to change the base?
Conversation
LLDB sets BypassResilience to have direct access to private properties of modules built with resilience. This setting is ignored in many paths that check resiliency though, which causes LLDB to fail to evaluate certain expressions. This commit simply makes sure that `isResilient` checks whether resiliency should be bypassed or not. rdar://137876089
@swift-ci test |
1 similar comment
@swift-ci test |
Is this tested in LLDB? |
The change seems very broad and makes me wonder how this setting was previously applied and if this could have any unintended sideeffects. How/where was the setting used so far? |
This is a swift-frontend flag:
Which is turned on by LLDB, and seems to be introduced for that purpose:
It's only checked in one place today:
I understand that this change is pretty broad, but I've seen multiple bug reports which are caused by the compiler assuming that certain functions exist because resiliency is enabled in different code paths (one of them fixed in #78486, which would not be needed anymore if this patch is approved). Instead of local fixes for each of these instances I thought a more broad fix made sense. Also, the flag is supposed to "Ignore all checks for module resilience", and it does not work as described today. |
This is tested in swiftlang/llvm-project#9809, I will add another test to that PR later if we go forward with this solution. |
LLDB sets BypassResilience to have direct access to private properties of modules built with resilience. This setting is ignored in many paths that check resiliency though, which causes LLDB to fail to evaluate certain expressions.
This commit simply makes sure that
isResilient
checks whether resiliency should be bypassed or not.rdar://137876089