Can’t build the compiler due to DebuggerSupport.swift:36:14

here is the crash dump:

[1347/1510][ 89%][2303.850s] Generating /swift/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/lib/swift/embedded/Swift.swiftmodule/armv7em-none-none-eabi.swiftmodule
FAILED: lib/swift/embedded/Swift.swiftmodule/armv7em-none-none-eabi.swiftmodule lib/swift/embedded/Swift.swiftmodule/armv7em-none-none-eabi.swiftdoc /swift/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/lib/swift/embedded/Swift.swiftmodule/armv7em-none-none-eabi.swiftmodule /swift/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/lib/swift/embedded/Swift.swiftmodule/armv7em-none-none-eabi.swiftdoc 
cd /swift/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/stdlib/public/core && /swift/swift-project/build/cmake-linux-x86_64/bin/cmake -E make_directory /swift/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/stdlib/public/core/embedded/armv7em && /swift/swift-project/build/cmake-linux-x86_64/bin/cmake -E remove -f /swift/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/lib/swift/embedded/Swift.swiftmodule/armv7em-none-none-eabi.swiftmodule /swift/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/lib/swift/embedded/Swift.swiftmodule/armv7em-none-none-eabi.swiftdoc && /swift/swift-project/build/cmake-linux-x86_64/bin/cmake -E make_directory /swift/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/lib/swift/embedded /swift/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/lib/swift/embedded/Swift.swiftmodule && /swift/swift-project/build/cmake-linux-x86_64/bin/cmake -E env PYTHONIOENCODING=UTF8 LD_LIBRARY_PATH=/opt/swift/5.9.2/usr/lib/swift/linux /usr/bin/python3.9 /swift/swift-project/swift/utils/line-directive @/swift/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/stdlib/public/core/81eed2b71b4043f7a19f80514872f19668ede62c.txt -- /swift/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/./bin/swiftc -emit-module -o /swift/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/lib/swift/embedded/Swift.swiftmodule/armv7em-none-none-eabi.swiftmodule -avoid-emit-module-source-info -target armv7em-none-none-eabi -resource-dir /swift/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/./lib/swift -O -g -D INTERNAL_CHECKS_ENABLED -D SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY -D SWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED -D SWIFT_ENABLE_RUNTIME_FUNCTION_COUNTERS -D SWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING -D SWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING -D SWIFT_ENABLE_EXPERIMENTAL_OBSERVATION -D SWIFT_RUNTIME_OS_VERSIONING -D SWIFT_STDLIB_ENABLE_UNICODE_DATA -D SWIFT_STDLIB_ENABLE_VECTOR_TYPES -D SWIFT_STDLIB_HAS_COMMANDLINE -D SWIFT_STDLIB_HAS_STDIN -D SWIFT_STDLIB_HAS_ENVIRON -Xcc -DSWIFT_STDLIB_HAS_ENVIRON -D SWIFT_STDLIB_OVERRIDABLE_RETAIN_RELEASE -D SWIFT_THREADING_ -tools-directory /swift/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-linux-x86_64/./bin -module-cache-path /swift/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/./module-cache -no-link-objc-runtime -Xfrontend -enforce-exclusivity=unchecked -nostdimport -parse-stdlib -module-name Swift -Xfrontend -group-info-path -Xfrontend /swift/swift-project/swift/stdlib/public/core/GroupInfo.json -swift-version 5 -runtime-compatibility-version none -disable-autolinking-runtime-compatibility-dynamic-replacements -Xfrontend -disable-autolinking-runtime-compatibility-concurrency -warn-swift3-objc-inference-complete -Xfrontend -disable-objc-interop -Xfrontend -enable-experimental-associated-type-inference -diagnostic-style swift -Xllvm -sil-inline-generics -Xllvm -sil-partial-specialization -Xfrontend -enable-experimental-concise-pound-file -enable-experimental-feature Macros -enable-experimental-feature FreestandingMacros -enable-experimental-feature Extern -enable-experimental-feature BitwiseCopyable -Xcc -D__MACH__ -Xcc -D__APPLE__ -Xcc -ffreestanding -enable-experimental-feature Embedded -Xfrontend -enable-ossa-modules -Xfrontend -define-availability -Xfrontend SwiftStdlib\ 9999:macOS\ 9999,\ iOS\ 9999,\ watchOS\ 9999,\ tvOS\ 9999 -Xfrontend -define-availability -Xfrontend SwiftStdlib\ 5.0:macOS\ 10.14.4,\ iOS\ 12.2,\ watchOS\ 5.2,\ tvOS\ 12.2 -Xfrontend -define-availability -Xfrontend SwiftStdlib\ 5.1:macOS\ 10.15,\ iOS\ 13.0,\ watchOS\ 6.0,\ tvOS\ 13.0 -Xfrontend -define-availability -Xfrontend SwiftStdlib\ 5.2:macOS\ 10.15.4,\ iOS\ 13.4,\ watchOS\ 6.2,\ tvOS\ 13.4 -Xfrontend -define-availability -Xfrontend SwiftStdlib\ 5.3:macOS\ 11.0,\ iOS\ 14.0,\ watchOS\ 7.0,\ tvOS\ 14.0 -Xfrontend -define-availability -Xfrontend SwiftStdlib\ 5.4:macOS\ 11.3,\ iOS\ 14.5,\ watchOS\ 7.4,\ tvOS\ 14.5 -Xfrontend -define-availability -Xfrontend SwiftStdlib\ 5.5:macOS\ 12.0,\ iOS\ 15.0,\ watchOS\ 8.0,\ tvOS\ 15.0 -Xfrontend -define-availability -Xfrontend SwiftStdlib\ 5.6:macOS\ 12.3,\ iOS\ 15.4,\ watchOS\ 8.5,\ tvOS\ 15.4 -Xfrontend -define-availability -Xfrontend SwiftStdlib\ 5.7:macOS\ 13.0,\ iOS\ 16.0,\ watchOS\ 9.0,\ tvOS\ 16.0 -Xfrontend -define-availability -Xfrontend SwiftStdlib\ 5.8:macOS\ 13.3,\ iOS\ 16.4,\ watchOS\ 9.4,\ tvOS\ 16.4 -Xfrontend -define-availability -Xfrontend SwiftStdlib\ 5.9:macOS\ 14.0,\ iOS\ 17.0,\ watchOS\ 10.0,\ tvOS\ 17.0 -Xfrontend -define-availability -Xfrontend SwiftStdlib\ 5.10:macOS\ 9999,\ iOS\ 9999,\ watchOS\ 9999,\ tvOS\ 9999 -Xfrontend -define-availability -Xfrontend SwiftStdlib\ 5.11:macOS\ 9999,\ iOS\ 9999,\ watchOS\ 9999,\ tvOS\ 9999 -Xfrontend -target-min-inlining-version -Xfrontend min -module-link-name swiftCore -whole-module-optimization -color-diagnostics -parse-as-library -resource-dir /swift/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/./lib/swift -I /swift/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/./lib/swift/embedded @/swift/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/stdlib/public/core/81eed2b71b4043f7a19f80514872f19668ede62c.txt

*** Signal 11: Backtracing from 0x7efd0e874860... done ***

*** Program crashed: Bad pointer dereference at 0x0000000000000066 ***

Thread 0 "swift-driver" crashed:

0  0x00007efd0e874860 <unknown> in lib_InternalSwiftScan.so

Thread 1:

0  0x00007efd163ae86e epoll_wait + 94 in libc.so.6


Registers:

rax 0x00007efd12e21df0  80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ················
rdx 0x00007efd12e21d70  80 f1 c3 0f fd 7e 00 00 00 00 00 00 00 00 00 00  ·ñ÷ý~··········
rcx 0x0000000000000000  0
rbx 0x0000000000000000  0
rsi 0x00007efd12e21d70  80 f1 c3 0f fd 7e 00 00 00 00 00 00 00 00 00 00  ·ñ÷ý~··········
rdi 0x0000000000000000  0
rbp 0x00000000000000f8  248
rsp 0x00007ffd0a540618  fe 88 6e 08 fd 7e 00 00 08 72 60 0f fd 7e 00 00  þ·n·ý~···r`·ý~··
 r8 0x000055ea0083ac20  04 00 00 00 00 00 00 00 67 92 d2 91 d9 ed 55 c6  ········g·Ò·ÙíUÆ
 r9 0x0000000000000000  0
r10 0x00007efd1626f410  f7 09 00 00 12 00 0e 00 60 6b 05 00 00 00 00 00  ÷·······`k······
r11 0x00007efd162b6b60  f3 0f 1e fa 41 57 41 56 41 55 41 54 55 53 48 83  ó··úAWAVAUATUSH·
r12 0x00007ffd0a544cc8  73 64 54 0a fd 7f 00 00 cd 64 54 0a fd 7f 00 00  sdT·ý···ÍdT·ý···
r13 0x00007ffd0a545490  e0 89 54 0a fd 7f 00 00 f5 89 54 0a fd 7f 00 00  à·T·ý···õ·T·ý···
r14 0x00007efd12e21dc0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ················
r15 0x0000000000000000  0
rip 0x00007efd0e874860  00 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00  ·ffffff.········

rflags 0x0000000000010283  SF CF

cs 0x0033  fs 0x0000  gs 0x0000


Images (43 omitted):

0x00007efd07c00000–0x00007efd0f605e90 <no build ID>                            lib_InternalSwiftScan.so /swift/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/lib/lib_InternalSwiftScan.so
0x00007efd16260000–0x00007efd163fc04c a84b0b221620b4944c5940d3bed62056c7d7baa4 libc.so.6                /usr/lib64/libc.so.6

Backtrace took 0.02s

[1357/1510][ 89%][2428.842s] Generating /swift/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/./lib/swift/linux/Swift.swiftmodule/x86_64-unknown-linux-gnu.swiftmodule
warning: Could not read SDKSettings.json for SDK at: /
[1358/1510][ 89%][2515.994s] Compiling /swift/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/stdlib/public/core//LINUX/x86_64/Swift.o
warning: Could not read SDKSettings.json for SDK at: /
ninja: build stopped: subcommand failed.
ERROR: command terminated with a non-zero exit status 1, aborting

i attempted this build on Amazon Linux 2023 using a 5.9.2 toolchain. i had previously built the toolchain successfully using 5.8.1.