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

Compiler crash when compiling for Armv5 #78344

Open
colemancda opened this issue Dec 22, 2024 · 1 comment · May be fixed by #78348
Open

Compiler crash when compiling for Armv5 #78344

colemancda opened this issue Dec 22, 2024 · 1 comment · May be fixed by #78348
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. crash Bug: A crash, i.e., an abnormal termination of software triage needed This issue needs more specific labels

Comments

@colemancda
Copy link
Contributor

colemancda commented Dec 22, 2024

Description

Compiling the Swift StdLib forarmv5-unknown-linux-gnueabi is currently failing with a compiler crash when the Synchronization module is enabled.

Reproduction

Cross compile the Swift Standard Library for armv5-unknown-linux-gnueabi with -DSWIFT_ENABLE_SYNCHRONIZATION=ON.

Stack dump

1.	Swift version 6.0.3 (swift-6.0.3-RELEASE)
2.	Compiling with effective version 5.10
3.	Running pass 'Function Pass Manager' on module '/workspaces/buildroot/output/build/swift-6.0.3/build/stdlib/public/Synchronization/LINUX/armv5/Synchronization.o'.
4.	Running pass 'ARM Instruction Selection' on function '@"$s15Synchronization12_MutexHandleV9_lockSlowyys6UInt32VF"'
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):
0  swift-frontend 0x000055c1d7b05bc7
1  swift-frontend 0x000055c1d7b03b8e
2  swift-frontend 0x000055c1d7b0623a
3  libc.so.6      0x00007f48e0fc3520
4  libc.so.6      0x00007f48e10179fc pthread_kill + 300
5  libc.so.6      0x00007f48e0fc3476 raise + 22
6  libc.so.6      0x00007f48e0fa97f3 abort + 211
7  swift-frontend 0x000055c1d20c1b6d
8  swift-frontend 0x000055c1d7a65a4b
9  swift-frontend 0x000055c1d47a6da0
10 swift-frontend 0x000055c1d47a631d
11 swift-frontend 0x000055c1d3d51c77
12 swift-frontend 0x000055c1d479dd9f
13 swift-frontend 0x000055c1d479d420
14 swift-frontend 0x000055c1d479c6b1
15 swift-frontend 0x000055c1d479a29b
16 swift-frontend 0x000055c1d3d4ef71
17 swift-frontend 0x000055c1d52e2b28
18 swift-frontend 0x000055c1d77da481
19 swift-frontend 0x000055c1d77e1693
20 swift-frontend 0x000055c1d77db010
21 swift-frontend 0x000055c1d21f5611
22 swift-frontend 0x000055c1d21f4c60
23 swift-frontend 0x000055c1d1e4f00b
24 swift-frontend 0x000055c1d1e4a630
25 swift-frontend 0x000055c1d1e4957b
26 swift-frontend 0x000055c1d1e4bf6b
27 swift-frontend 0x000055c1d1e4b1d6
28 swift-frontend 0x000055c1d1c223b7
29 libc.so.6      0x00007f48e0faad90
30 libc.so.6      0x00007f48e0faae40 __libc_start_main + 128
31 swift-frontend 0x000055c1d1c20ad5

Expected behavior

This crash is not reproducible when cross compiling for Armv7, Arm64 or x86_64.

Environment

swift-6.0.3-RELEASE
swift:6.0.3-jammy Docker image

Additional information

The Swift StdLib cross compilation scripts are found in MillerTechnologyPeru/buildroot-swift. The crash logs are attached.

logs_32337350484.zip

@colemancda colemancda added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. crash Bug: A crash, i.e., an abnormal termination of software triage needed This issue needs more specific labels labels Dec 22, 2024
@colemancda
Copy link
Contributor Author

The error seems to be determined by the lack of wfe support in Armv5, and there doesn't seem to be a simple way to differentiate the different arm architecture versions.

#if arch(arm) || arch(arm64) || arch(arm64_32)

@colemancda colemancda linked a pull request Dec 23, 2024 that will close this issue
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. crash Bug: A crash, i.e., an abnormal termination of software triage needed This issue needs more specific labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant