Skip to content
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

REPL does not work in 6.0.0 release on Windows #76702

Open
compnerd opened this issue Sep 25, 2024 · 7 comments
Open

REPL does not work in 6.0.0 release on Windows #76702

compnerd opened this issue Sep 25, 2024 · 7 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. lldb regression REPL swift 6.0 Windows Platform: Windows

Comments

@compnerd
Copy link
Member

Description

No response

Reproduction

swift repl

Expected behavior

The REPL should launch

Environment

6.0.0-RELEASE

Additional information

No response

@compnerd compnerd added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. Windows Platform: Windows REPL regression lldb labels Sep 25, 2024
@compnerd
Copy link
Member Author

CC: @al45tair

Turns out that this is a more serious consequence of #70005. We are also apparently scrubbing Path which in turns prevents the LoadLibraryW to fail when loading swiftCore in the sacrificial process. This can obviously be worked around by doing something like:

lldb --repl -x -S \lldb.init

Where \lldb.init contains:

settings set target.env-vars Path=S:\b\101\bin;S:\b\x64\cmark-gfm-0.29.0.gfm.13

@compnerd
Copy link
Member Author

This is a regression as this worked at least in 20240523 on main.

@compnerd
Copy link
Member Author

CC: @adrian-prantl

@adrian-prantl
Copy link
Contributor

@compnerd I'm happy to review patches & provide guidance, but I don't think I have time to investigate this myself.

@compnerd
Copy link
Member Author

@adrian-prantl swiftlang/llvm-project#9334 addresses this - the underlying issue is that we are clearing out the environment

@adrian-prantl
Copy link
Contributor

Who is "we"? Where does it happen?

@compnerd
Copy link
Member Author

In this context, it is LLDB. When the sacrificial inferior is created, it is done so without an initial environment. There are some rather important environment variables such as Path, UserProfile, TEMP, etc that need to be preserved for the tools to function. Retaining the full environment resolves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. lldb regression REPL swift 6.0 Windows Platform: Windows
Projects
None yet
Development

No branches or pull requests

3 participants