vapor: Crashed when calling Bcrypt.hash

Everything works fine in the XCode, but crashes when run in the terminal.

Steps to reproduce

Test project: Archive.zip

  1. swift build -c debug
  2. swift run Run
  3. curl http://localhost:8080/test -> crash

Expected behavior

Should works

Actual behavior

got crash with message: '.build/debug/Run serve' terminated by signal SIGSEGV (Address boundary error)

Environment

XCode Version 11.4 beta 3 (11N132i) Swift version: Apple Swift version 5.2 (swiftlang-1103.0.30 clang-1103.0.30)

  • Vapor Framework version: 4.0-rc.3.1
  • Vapor Toolbox version: vapor 3.1.10 and 18.0.0-beta.27
  • OS version: macOS 10.15.3

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (5 by maintainers)

Most upvoted comments

You need to upgrade to Xcode 12.5.1

@all

Works on swift-5.2.4-release too😂

/Library/Developer/Toolchains/swift-5.2.4-RELEASE.xctoolchain/usr/bin/swift build
Apple Swift version 5.2.4 (swift-5.2.4-RELEASE)
Target: x86_64-apple-darwin19.5.0

So the below lastest version bundled with xcode is different from swift-5.2.4-RELEASE even though have the same version code 5.2.4

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -version
Apple Swift version 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53)
Target: x86_64-apple-darwin19.5.0

@tanner0101 not yet. But today I have tested with the last development snapshot (swift-5.2-DEVELOPMENT-SNAPSHOT-2020-03-10-a-osx) and this issue has gone.