Ppc64le build started breaking for swift compiler

Hi,

First of all, please let me know if this is wrong forum for following question. Originally I tried to post this to swift-dev mailing list, but then came to know that it has been shut down and migrated here. So apologies if this message lands at wrong forum - please guide me to right place.

I was rebuilding swift to validate my ppc64le related changes done in Swift and related repositories. I am observing crashes during swift build. The crashes are happening in swift/stdlib/public/core/Builtin.swift file and I was able to trace the cause to a new addition made under
commit 3be2faf5d320000b2fae7049dc2400eb1dd4dcbf which seems to be a new implementation for 64-bit StringGuts.

I have not yet figured out exact code or a fix for the crash, but just wanted to give a heads-up.

Thanks,
Atul.

This should go to https://bugs.swift.org then. Please fie a bug there.

Do you have any kind of stack trace?

The code should (in theory) be valid for x86_64, arm64, and ppc64le, but the latter is not tested in CI.

Sorry for the delay in replying, here is the stack trace I am seeing in the console:

--- bootstrap: note: building runtime v4 target: PackageDescription4:
Compile Swift Module 'PackageDescription' (9 sources)
Link PackageDescription
--- bootstrap: note: building self-hosted 'swift-build': env SWIFT_EXEC=/root/latest/swift-source/buildbot_incremental/swiftpm-linux-powerpc64le/powerpc64le-unknown-linux/release/swiftc SWIFTPM_BUILD_DIR=/root/latest/swift-source/buildbot_incremental/swiftpm-linux-powerpc64le /root/latest/swift-source/buildbot_incremental/swiftpm-linux-powerpc64le/powerpc64le-unknown-linux/release/swift-build-stage1 --disable-sandbox -Xlinker -rpath -Xlinker $ORIGIN/../lib/swift/linux -Xlinker -L -Xlinker /root/latest/swift-source/buildbot_incremental/foundation-linux-powerpc64le/Foundation -Xlinker -rpath -Xlinker /root/latest/swift-source/buildbot_incremental/foundation-linux-powerpc64le/Foundation -Xswiftc -I/root/latest/swift-source/buildbot_incremental/foundation-linux-powerpc64le/Foundation -Xswiftc -I/root/latest/swift-source/buildbot_incremental/foundation-linux-powerpc64le/Foundation/usr/lib/swift -Xlinker -L -Xlinker /root/latest/swift-source/buildbot_incremental/xctest-linux-powerpc64le -Xlinker -rpath -Xlinker /root/latest/swift-source/buildbot_incremental/xctest-linux-powerpc64le -Xswiftc -I/root/latest/swift-source/buildbot_incremental/xctest-linux-powerpc64le -Xlinker -L/root/latest/swift-source/buildbot_incremental/libdispatch-linux-powerpc64le/src/.libs -Xswiftc -I/root/latest/swift-source/buildbot_incremental/libdispatch-linux-powerpc64le/src -Xswiftc -I/root/latest/swift-source/buildbot_incremental/libdispatch-linux-powerpc64le/src/swift -Xswiftc -I/root/latest/swift-source/swift-corelibs-libdispatch -Xcc -fblocks -Xswiftc -enable-testing --configuration release --build-tests
Fatal error: file /root/latest/swift-source/swift/stdlib/public/core/Builtin.swift, line 466
Current stack trace:
0 libswiftCore.so 0x00003fff83344f90 swift_stdlib_reportFatalErrorInFile + 276
1 libswiftCore.so 0x00003fff83288b28 + 5933864
2 libswiftCore.so 0x00003fff8328859c + 5932444
3 libswiftCore.so 0x00003fff82e944f8 + 1787128
4 libswiftCore.so 0x00003fff832888b8 + 5933240
5 libswiftCore.so 0x00003fff832884f4 + 5932276
6 libswiftCore.so 0x00003fff82e944f8 + 1787128
7 libswiftCore.so 0x00003fff831cd3b4 + 5166004
8 libswiftCore.so 0x00003fff831cd214 + 5165588
9 libswiftCore.so 0x00003fff82e944f8 + 1787128
10 libswiftCore.so 0x00003fff82e936c0 fatalErrorMessage(:
:file:line:flags:) + 212
11 libswiftCore.so 0x00003fff8317b790 + 4831120
12 libswiftCore.so 0x00003fff83193840 + 4929600
13 libswiftCore.so 0x00003fff8312e308 + 4514568
14 libswiftCore.so 0x00003fff832f794c + 6388044
15 libstdc++.so.6 0x00003fff81bc2f00 __once_proxy + 52
16 libpthread.so.0 0x00003fff81e322f4 + 74484
17 libswiftCore.so 0x00003fff832f7850 swift_once + 120
18 libswiftCore.so 0x00003fff8312e380 static CommandLine.arguments.getter + 52
19 swift-build-stage1 0x00000000258dd360 + 316256
20 libc.so.6 0x00003fff8181309c + 143516
21 libc.so.6 0x00003fff818131e0 __libc_start_main + 184
--- bootstrap: error: build failed with exit status -5
utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

I tried to start swift build in debug mode, but my VM does not have enough resources to complete the build task.

I have raised https://bugs.swift.org/browse/SR-7441 for this issue.