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

[SR-13424] Packages using .systemLibrary(name:pkgConfig:) can lead to a seg fault from Swift Package Manager #4506

Open
swift-ci opened this issue Aug 20, 2020 · 2 comments
Labels

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-13424
Radar rdar://problem/67500702
Original Reporter Dadoum (JIRA User)
Type Bug

Attachment: Download

Environment

Observed in Manjaro Linux, 20.0 and 20.1, with the swift-bin AUR package. (CentOS toolchain with library name patches)

Additional Detail from JIRA
Votes 1
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: d6c64958297b6bc1804042e9d37c4f1f

Issue Description:

On Arch-Linux-based distributions, using a system library with a pkgConfig arg will make SPM segfault. This is due to the use of realpath here

Edit: added lldb debugger trace

@typesanitizer
Copy link

@swift-ci create

@swift-ci
Copy link
Contributor Author

Comment by Mikoláš Stuchlík (JIRA)

This issue was discussed by the SwiftGtk developers in rhx/SwiftGtk#43 .

I have built SPM from main using -serialize-debugging-options frontend option and run build command in lldb. The result is in file trace.txt

The issue is caused by circular dependencies in .pc files on Arch which results in looping the PkgConfig initializer.

Example of such behavior can be observed, when attempting to add package `pangocairo` using pkgConfig.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants