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

swift-symbolgraph-extract crashes when trying to emit the 'Swift' module #61531

Closed
tayloraswift opened this issue Oct 10, 2022 · 3 comments · Fixed by #62825 or #62834
Closed

swift-symbolgraph-extract crashes when trying to emit the 'Swift' module #61531

tayloraswift opened this issue Oct 10, 2022 · 3 comments · Fixed by #62825 or #62834
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. SymbolGraphGen The swiftSymbolGraphGen library, responsible for gathering and emitting symbol graphs.

Comments

@tayloraswift
Copy link
Member

we used to be able to generate the symbolgraph for the standard library with:

swift symbolgraph-extract \
    -target x86_64-unknown-linux-gnu \
    -output-dir . \
    -module-name Swift

which worked fine all through the winter, spring, and summer.

but now it just crashes the toolchain:

$ swift symbolgraph-extract -target x86_64-unknown-linux-gnu -output-dir . -module-name Swift
swift-symbolgraph-extract: /home/build-user/llvm-project/llvm/include/llvm/ADT/SmallVector.h:291: llvm::SmallVectorTemplateCommon::reference llvm::SmallVectorTemplateCommon<const swift::ProtocolCompositionType *, void>::back() [T = const swift::ProtocolCompositionType *]: Assertion `!empty()' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /home/ec2-user/.swiftenv/versions/DEVELOPMENT-SNAPSHOT-2022-10-03-a/usr/bin/swift-symbolgraph-extract -target x86_64-unknown-linux-gnu -output-dir . -module-name Swift
1.      Swift version 5.8-dev (LLVM c3aebe50177cd03, Swift 3f020375e568042)
@tayloraswift tayloraswift added the bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. label Oct 10, 2022
@tayloraswift
Copy link
Member Author

i tested the nightlies from the past month and found that the most recent toolchain that does not crash is swift-DEVELOPMENT-SNAPSHOT-2022-09-12-a. we apparently lost the ability to generate symbolgraphs for the standard library starting with DEVELOPMENT-SNAPSHOT-2022-09-22-a.

@LucianoPAlmeida LucianoPAlmeida added the SymbolGraphGen The swiftSymbolGraphGen library, responsible for gathering and emitting symbol graphs. label Oct 11, 2022
theMomax added a commit to theMomax/swift that referenced this issue Jan 4, 2023
…emit the 'Swift' module

fix a crash in symbol graph generation caused by an empty SmallVector access while expanding protocol compositions during conformance expansion for extension block symbols
theMomax added a commit to theMomax/swift that referenced this issue Jan 4, 2023
…emit the 'Swift' module

fix a crash in symbol graph generation caused by an empty SmallVector access while expanding protocol compositions during conformance expansion for extension block symbols
QuietMisdreavus pushed a commit that referenced this issue Jan 6, 2023
…'Swift' module (#62834)

fix a crash in symbol graph generation caused by an empty SmallVector access while expanding protocol compositions during conformance expansion for extension block symbols

rdar://103322385
QuietMisdreavus pushed a commit that referenced this issue Jan 6, 2023
…'Swift' module (#62825)

fix a crash in symbol graph generation caused by an empty SmallVector access while expanding protocol compositions during conformance expansion for extension block symbols

rdar://103322385
@QuietMisdreavus
Copy link
Contributor

@Kelvin13 It looks like there should be nightly toolchains with #62825 in them now; can you double-check that this was fixed?

@tayloraswift
Copy link
Member Author

yes, this is now fixed in swift-5.8-DEVELOPMENT-SNAPSHOT-2023-01-09-a. thank you!!

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. SymbolGraphGen The swiftSymbolGraphGen library, responsible for gathering and emitting symbol graphs.
Projects
None yet
3 participants