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-14903] Crash while compiling swift on Debian #57250

Closed
dhoepfl opened this issue Jul 9, 2021 · 3 comments
Closed

[SR-14903] Crash while compiling swift on Debian #57250

dhoepfl opened this issue Jul 9, 2021 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@dhoepfl
Copy link
Contributor

dhoepfl commented Jul 9, 2021

Previous ID SR-14903
Radar rdar://problem/80384022
Original Reporter @dhoepfl
Type Bug
Environment

Swift source rev fca6072.

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

md5: 491b9a0f10363498805d545ee7c796f2

is blocked by:

  • SR-14978 Illegal instruction pshufb generated for old AMD CPU

Issue Description:

/home/user/llvm/opt/usr/bin/swift-frontend -frontend -c -primary-file /home/user/llvm/swift-source/swift/benchmark/single-source/LuhnAlgoLazy.swift -emit-module-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/LuhnAlgoLazy.build/LuhnA
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project and the crash backtrace.
Stack dump:
0.      Program arguments: /home/user/llvm/opt/usr/bin/swift-frontend -frontend -c -primary-file /home/user/llvm/swift-source/swift/benchmark/single-source/LuhnAlgoLazy.swift -emit-module-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/deb
1.      Swift version 5.5-dev (LLVM 5e810bd6d7c2177, Swift fca6072b931e4b5)
2.      Compiling with effective version 4.1.50
3.      While evaluating request ParseSourceFileRequest(source_file "/home/user/llvm/swift-source/swift/benchmark/single-source/LuhnAlgoLazy.swift")
4.      With parser at source location: /home/user/llvm/swift-source/swift/benchmark/single-source/LuhnAlgoLazy.swift:121:7
 #​0 0x0000000005c761d3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/user/llvm/opt/usr/bin/swift-frontend+0x5c761d3)
 #​1 0x0000000005c73fbe llvm::sys::RunSignalHandlers() (/home/user/llvm/opt/usr/bin/swift-frontend+0x5c73fbe)
 #​2 0x0000000005c7655c SignalHandler(int) (/home/user/llvm/opt/usr/bin/swift-frontend+0x5c7655c)
 #​3 0x00007fd00fe9b730 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12730)
 #​4 0x0000000001b22c97 isValidIdentifierContinuationCodePoint(unsigned int) (/home/user/llvm/opt/usr/bin/swift-frontend+0x1b22c97)
 #​5 0x0000000001b1af43 swift::Lexer::lexTrivia(bool, char const*) (/home/user/llvm/opt/usr/bin/swift-frontend+0x1b1af43)
 #​6 0x0000000001b1a0c1 swift::Lexer::lexImpl() (/home/user/llvm/opt/usr/bin/swift-frontend+0x1b1a0c1)
 #​7 0x0000000001b75b8b swift::Parser::consumeTokenWithoutFeedingReceiver() (/home/user/llvm/opt/usr/bin/swift-frontend+0x1b75b8b)
 #​8 0x0000000001b24037 swift::Parser::isStartOfSwiftDecl() (/home/user/llvm/opt/usr/bin/swift-frontend+0x1b24037)
 #&#8203;9 0x0000000001b83b18 swift::Parser::parseBraceItems(llvm::SmallVectorImpl<swift::ASTNode>&, swift::BraceItemListKind, swift::BraceItemListKind, bool&) (/home/user/llvm/opt/usr/bin/swift-frontend+0x1b83b18)
#&#8203;10 0x0000000001b23537 swift::Parser::parseTopLevel(llvm::SmallVectorImpl<swift::Decl*>&) (/home/user/llvm/opt/usr/bin/swift-frontend+0x1b23537)
#&#8203;11 0x0000000001b80daa swift::ParseSourceFileRequest::evaluate(swift::Evaluator&, swift::SourceFile*) const (/home/user/llvm/opt/usr/bin/swift-frontend+0x1b80daa)
#&#8203;12 0x0000000001b8188c swift::SimpleRequest<swift::ParseSourceFileRequest, swift::SourceFileParsingResult (swift::SourceFile*), (swift::RequestFlags)12>::evaluateRequest(swift::ParseSourceFileRequest const&, swift::Evaluator&) (/home/user/llvm/opt/usr/bin/swift-frontend+0x1b8188c)
#&#8203;13 0x0000000001a57684 llvm::Expected<swift::ParseSourceFileRequest::OutputType> swift::Evaluator::getResultUncached<swift::ParseSourceFileRequest>(swift::ParseSourceFileRequest const&) (/home/user/llvm/optTraceback (most recent call last):
  File "/home/user/llvm/swift-source/swift/benchmark/scripts/build_script_helper.py", line 63, in <module>
    main()
  File "/home/user/llvm/swift-source/swift/benchmark/scripts/build_script_helper.py", line 57, in main
    perform_build(args, swiftbuild_path, "debug", "Benchmark_Onone", "-Onone")
  File "/home/user/llvm/swift-source/swift/benchmark/scripts/build_script_helper.py", line 39, in perform_build
    shutil.copy(binpath, finalpath)
  File "/usr/lib/python2.7/shutil.py", line 139, in copy
    copyfile(src, dst)
  File "/usr/lib/python2.7/shutil.py", line 96, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/debug/SwiftBench'
('-- Warning: {}', 'Host toolchain could not locate a compiler to build swift-driver. (Try `--skip-early-swift-driver`)')
--- Building cmark ---

The line in question is:

infix operator • : DotPrecedence

Hexdump:

00000000  69 6e 66 69 78 20 6f 70  65 72 61 74 6f 72 20 e2  |infix operator .|
00000010  80 a2 20 3a 20 44 6f 74  50 72 65 63 65 64 65 6e  |.. : DotPreceden|
00000020  63 65 0a                                          |ce.|
@typesanitizer
Copy link

@swift-ci create

@dhoepfl
Copy link
Contributor Author

dhoepfl commented Jul 26, 2021

Just noticed that I filed the same crash again, with more info on the background.

See SR-14978

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@dhoepfl
Copy link
Contributor Author

dhoepfl commented May 4, 2022

I think this was fixed in LLVM

@dhoepfl dhoepfl closed this as completed May 4, 2022
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. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

2 participants