-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Revert "Revert "Enable stdlib resilience"" #15030
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
Conversation
@swift-ci test |
// In LLDB always use the default resilience strategy, so IRGen can query | ||
// the size of resilient types. | ||
if (!Ctx.LangOpts.DebuggerSupport) | ||
M.setResilienceStrategy(extendedInfo.getResilienceStrategy()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a test for this? We already have a frontend flag to fake debugger support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The answer is of course, yes we should, but do you have any suggestion how this could be tested inside of swift? It is indirectly tested by the LLDB testsuite.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SIL output should be different when passing around a struct by value. You should be able to define a resilient module with a public struct, and then examine the output of -emit-silgen on a client function that takes an argument of that type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t think it’s worth the effort. The lldb test suite fails without this hack, and it’s only temporary. It will go away once lldb can use remote mirrors to calculate sizes of resilient types.
@swift-ci Please test source compatibility |
05c8c21
to
d6c378e
Compare
I added a testcase. Turned out to be much easier than anticipated thanks to Jordan's pointers. |
@swift-ci test |
Build failed |
Build failed |
@swift-ci test and merge |
osx failed with a timeout on two stdlib tests. |
@swift-ci test platform os x |
@swift-ci test and merge |
That kind of timeout could be real, since we are changing how the stdlib is built… |
Let's see if it reproduces. |
…LLDB This turns all resilient types into fixed layouts thus allowing LLDB to query their size. The long-term plan is to use remote mirrors for this unformation instead of swift IRGen, but the library is not yet up to the task. rdar://problem/36663932
d6c378e
to
39cda11
Compare
Looks like it does. I'll back out the enable resilience part for now. |
@swift-ci test and merge |
Who is the right person to look into why enabling stdlib resilience causes stdlib test timeouts? |
@swift-ci test and merge |
"stdlib test timeouts" isn't very helpful. Which tests? |
https://ci.swift.org/job/swift-PR-osx/3560/testReport/ |
Hm, it is totally possible that something in one of those overlays should be fixed-layout and isn't. …although that seems weird for the OpenCL one. No quick answer, so please file a Radar! Anna will assign it to me or Slava, most likely. |
This works around the LLDB problems by deserializing all modules with the default resilience strategy when in LLDB mode.
rdar://problem/36663932