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-12424] [5.2] Calling C module segfaults via CLI only #54863

Closed
swift-ci opened this issue Mar 26, 2020 · 8 comments
Closed

[SR-12424] [5.2] Calling C module segfaults via CLI only #54863

swift-ci opened this issue Mar 26, 2020 · 8 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-12424
Radar rdar://63137100
Original Reporter tannernelson (JIRA User)
Type Bug
Status Resolved
Resolution Done
Environment

Xcode: Version 11.4 (11E146)

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

md5: 350de5128f74cdcfd9a534f734073874

Issue Description:

To recreate:

...
Test Case '-[VaporTests.AuthenticationTests testSessionAuthentication]' passed (0.005 seconds).
Test Suite 'AuthenticationTests' passed at 2020-03-26 13:03:27.584.
     Executed 5 tests, with 0 failures (0 unexpected) in 1.017 (1.017) seconds
Test Suite 'BcryptTests' started at 2020-03-26 13:03:27.584
Test Case '-[VaporTests.BcryptTests testFail]' started.
Exited with signal code 11

Line 70 of Sources/Vapor/Bcrypt/Bcrypt.swift which calls into the `CBcrypt` module is causing the segfault.

What's interesting is that this doesn't happen in Xcode. It only happens when running `swift test` via the CLI.

@beccadax
Copy link
Contributor

@swift-ci create

@eeckstein
Copy link
Member

tannernelson (JIRA User) Is it possible to isolate this problem a bit more?
I tried to run the tests and got several fails and I'm not sure if this is for the same reason you reported.

@swift-ci
Copy link
Collaborator Author

swift-ci commented Jun 1, 2020

Comment by tanner0101 (JIRA)

@eeckstein I created a simpler repro here: vapor/vapor#2379

1: Clone vapor/vapor

2: Checkout branch `SR-12424`

3: Run `SR12424` target via CLI (`swift run SR12424`)

@eeckstein
Copy link
Member

Thanks, reproduced

@gwynne
Copy link
Contributor

gwynne commented Oct 30, 2020

This appears to be fixed at least as recently as Swift 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1), as found in Xcode 12.1 (12A7403).

@weissi
Copy link
Member

weissi commented Apr 28, 2021

previously the linked radar was rdar://problem/62200985 but the new one has the actual debugging.

@swift-ci
Copy link
Collaborator Author

Comment by Paul Schifferer (JIRA)

It should be noted that this works when built with Xcode Version 12.5 (12E262) and Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55), but does not work when built with the exact same version of Swift from the command line.

@weissi
Copy link
Member

weissi commented Jun 10, 2021

schifferer (JIRA User) Yes, this is known, thank you.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
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.
Projects
None yet
Development

No branches or pull requests

5 participants