Skip to content

[5.8] Add back -no-toolchain-stdlib-rpath when installing sourcekit-lsp on linux #720

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

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

finagolfin
Copy link
Member

Cherrypick of #715

Explanation: Pull #597 incorrectly removed this, as it's still needed on ELF platforms.

This was fine in 5.7.3, but will regress in 5.8 without this pull:

> readelf -d swift-5.*-ubuntu20.04/usr/bin/sourcekit-lsp |ag "File:|runpath"
File: swift-5.7.3-RELEASE-ubuntu20.04/usr/bin/sourcekit-lsp
 0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN:$ORIGIN/../lib/swift/linux]
File: swift-5.8-DEVELOPMENT-SNAPSHOT-2023-03-07-a-ubuntu20.04/usr/bin/sourcekit-lsp
 0x000000000000001d (RUNPATH)            Library runpath: [/home/build-user/swift-nightly-install/usr/lib/swift/linux:$ORIGIN:$ORIGIN/../lib/swift/linux]

Note the incorrect /home/build-user/... runpath in the 5.8 snapshot, which could be a security issue.

Scope: Only affects the runpath for the sourcekit-lsp executable on linux

SR Issue: None

Risk: None, simply lowers security risk

Testing: The CI was run when this was merged into trunk, including a full toolchain build.

Reviewer: @ahoppen

@airspeedswift, would be good to get this regression corrected before the 5.8 release. I will add an integration test in the coming weeks so that these runpath regressions don't happen again.

…linux

Pull swiftlang#597 incorrectly removed this, as it's still needed on ELF platforms.
@finagolfin
Copy link
Member Author

Ping @airspeedswift, too late to get this into 5.8? Would like to get it into the next patch release if so.

@ahoppen
Copy link
Member

ahoppen commented Mar 16, 2023

@swift-ci Please test

@airspeedswift airspeedswift self-assigned this Mar 16, 2023
@ahoppen ahoppen merged commit ec6b1d8 into swiftlang:release/5.8 Mar 17, 2023
@finagolfin
Copy link
Member Author

Glad to see this in.

@finagolfin finagolfin deleted the rpath branch March 17, 2023 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants