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
[SR-4580] Tuple-swapping in REPL can segfault #4389
Comments
@swift-ci Create |
@swift-ci create |
Comment by Jim Ingham (JIRA) There seems to be some initialization of the standard library that happens differently depending on whether Foundation is or is not present. So if you are going to use Foundation or anything that brings it in, you need to do that first in your REPL session. |
Can lldb pre-load the Foundation overlay in that case to avoid that kind of issue? |
Comment by Jim Ingham (JIRA) We could, provided it is a good assumption that everybody using the REPL wants Foundation? |
The other approach would be to fix the standard library to pick up when Foundation is dynamically loaded and adjust itself accordingly. It isn't totally out of the realm of possibility that someone would dlopen Foundation at runtime even outside the REPL. Jim, did you happen to see where exactly in the library we were making different initialization choices? |
Comment by Jim Ingham (JIRA) I think Arnold fixed this with: |
Nate, can you confirm this works for you now? |
Environment
Apple Swift version 3.1 (swiftlang-802.0.51 clang-802.0.41)
Additional Detail from JIRA
md5: 4553d26f07e5447fcbb868620432a6b2
Issue Description:
If I enter the following code in the Swift REPL, line by line, I get a segfault:
If I don't use the first two lines, the remainder executes without issue. If I paste in the whole batch or compile them in a file, there's also no problem.
The text was updated successfully, but these errors were encountered: