-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[stdlib] AtomicWaitQueue crashes on Arm 32 bit #59043
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
Comments
This issue should be fixed with my changes to make this function use |
My change appears to still be present on main. This line from the crash: auto queue = new Impl(std::forward<Args>(args)...); Is now: auto queue = swift_cxx_newObject<Impl>(std::forward<Args>(args)...); And Could it be that lowering @compnerd and @buttaface for visibility as they were also working on alignment of types for Android/Windows. |
@grynspan, your change was never merged back to Swift 5.6, which is what he is testing. @colemancda, you are seeing this with all Swift executables running on Debian armhf? This could be related to another metadata crash I reported in a NIO test on Android armv7, #58307, though most Android armv7 executables run fine for me. |
No, the 5.5 runtime won't compile with 5.6 compiler and vice versa. That AtomicWaitQueue type is new to the 5.6 runtime. I also wanna note that if I compile the 5.6 Stdlib in release mode and run with qemu-arm-static, it runs and only crashes once every 20 tries. |
@buttaface D'oh! Well, if my change was never merged back, then… this issue is resolved in a future Swift version, I guess? |
Oh, I missed that you are mostly only seeing this with a Debug build. I haven't built the Debug 5.6 stdlib for armv7, only Release. Try backporting his pull #42355 to 5.6, maybe that will fix it? |
Adding the patch for #42355 into 5.6.1 release seems to have fixed it. Now I have a crash in the Concurrency module, but that is already filed under another bug. |
@grynspan Thanks for the fix! |
@colemancda Happy to help! |
Describe the bug
Swift's runtime crashes in
AtomicWaitQueue.createNewQueue
when accessing metadata during initialization.To Reproduce
Steps to reproduce the behavior:
./build.sh
withSWIFT_BUILD_CONFIGURATION=Debug
to cross compileswift-hello
and the Swift runtime libraries for Debian 11 with debug info.swift-hello
with LLDB or GDB.Expected behavior
Should not crash. Using the same scripts to cross compile Swift but setting
SWIFT_VERSION=5.5.3
and using a Swift 5.5.3 compiler, the program does not crash. This is a regression for Swift 5.6.1.Environment (please complete the following information):
https://github.com/colemancda/swift-armv7
https://hub.docker.com/layers/swift-armv7/colemancda/swift-armv7/amd64-prebuilt/images/sha256-5416cdf242a46a3fa580e8b919699461137a2adf85bdf7d6f693d117adb8b6dc?context=explore
Additional context
Here is a debug stack trace with LLDB.
The text was updated successfully, but these errors were encountered: