Open
Description
Description
we have again lost the ability to dump the symbol graph for the standard library
Reproduction
$ swift symbolgraph-extract -module-name _Concurrency -target x86_64-unknown-linux-gnu -minimum-access-level internal -output-dir .testing/swift/artifacts -emit-extension-block-symbols -skip-inherited-docs -pretty-print
Stack dump
swift-symbolgraph-extract: /home/ec2-user/swift/lib/SymbolGraphGen/DeclarationFragmentPrinter.h:140: virtual swift::symbolgraphgen::DeclarationFragmentPrinter::~DeclarationFragmentPrinter(): Assertion `NumFragments' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /usr/bin/swift-symbolgraph-extract -module-name _Concurrency -target x86_64-unknown-linux-gnu -minimum-access-level internal -output-dir .testing/swift/artifacts -emit-extension-block-symbols -skip-inherited-docs -pretty-print
1. Swift version 5.10-dev (LLVM dbfaba0078e9380, Swift 63c8b551eb2f613)
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
/usr/bin/swift-symbolgraph-extract(+0x72e33f4)[0x55b3dbcba3f4]
/usr/bin/swift-symbolgraph-extract(+0x72e10ce)[0x55b3dbcb80ce]
/usr/bin/swift-symbolgraph-extract(+0x72e3768)[0x55b3dbcba768]
/lib64/libc.so.6(+0x54dd0)[0x7f0f30297dd0]
/lib64/libc.so.6(+0xa153c)[0x7f0f302e453c]
/lib64/libc.so.6(raise+0x16)[0x7f0f30297d26]
/lib64/libc.so.6(abort+0xd3)[0x7f0f3026b7f3]
/lib64/libc.so.6(+0x2871b)[0x7f0f3026b71b]
/lib64/libc.so.6(+0x4dcc6)[0x7f0f30290cc6]
/usr/bin/swift-symbolgraph-extract(+0x1c3914a)[0x55b3d661014a]
/usr/bin/swift-symbolgraph-extract(+0x1c40612)[0x55b3d6617612]
/usr/bin/swift-symbolgraph-extract(+0x1c3595d)[0x55b3d660c95d]
/usr/bin/swift-symbolgraph-extract(+0x1c378c9)[0x55b3d660e8c9]
/usr/bin/swift-symbolgraph-extract(+0x1c3fc7e)[0x55b3d6616c7e]
/usr/bin/swift-symbolgraph-extract(+0x1c32e30)[0x55b3d6609e30]
/usr/bin/swift-symbolgraph-extract(+0xceda1b)[0x55b3d56c4a1b]
/usr/bin/swift-symbolgraph-extract(+0x1c3272a)[0x55b3d660972a]
/usr/bin/swift-symbolgraph-extract(+0x1c323a7)[0x55b3d66093a7]
/usr/bin/swift-symbolgraph-extract(+0xd2030f)[0x55b3d56f730f]
/usr/bin/swift-symbolgraph-extract(+0xcc3a20)[0x55b3d569aa20]
/lib64/libc.so.6(+0x3feb0)[0x7f0f30282eb0]
/lib64/libc.so.6(__libc_start_main+0x80)[0x7f0f30282f60]
/usr/bin/swift-symbolgraph-extract(+0xcc1d85)[0x55b3d5698d85]
Aborted (core dumped)
Expected behavior
it worked in 5.9
Environment
Swift version 5.10-dev (LLVM dbfaba0078e9380, Swift 63c8b55)
Target: x86_64-unknown-linux-gnu
Additional information
the crash only occurs when using -minimum-access-level internal
. this mode is required, even when the end goal is to only dump public symbols because of a separate issue where lib/SymbolGraphGen over-aggresively deletes nodes resulting in broken symbol graphs.