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

Ubuntu 24.04 Swift 5.10.1 release toolchain should not have assertions enabled #76091

Open
tayloraswift opened this issue Aug 26, 2024 · 7 comments
Assignees
Labels
build-script Area → utils: The build script

Comments

@tayloraswift
Copy link
Member

tayloraswift commented Aug 26, 2024

Description

it is hard to tell definitively if a toolchain has assertions enabled or not, however, i ran into #76089 while using the swift-5.10.1-RELEASE-ubuntu24.04 toolchain from https://www.swift.org/download/ , which suggests that this toolchain was built with assertions enabled. other 5.10.1 release toolchains, such as the Ubuntu 22.04 toolchain, do not exhibit this behavior.

Additional information

No response

@tayloraswift tayloraswift added task triage needed This issue needs more specific labels labels Aug 26, 2024
@shahmishal
Copy link
Member

The job used no_assertions preset. I wonder if something else in the swift build system changed and caused it to produce assertion based toolchain.

[./swift/utils/build-script] NOTE: using preset "buildbot_linux,no_assertions", which expands to 

./swift/utils/build-script '--swift-install-components=autolink-driver;compiler;clang-resource-dir-symlink;libexec;stdlib;swift-remote-mirror;sdk-overlay;static-mirror-lib;toolchain-tools;license;sourcekit-inproc' '--llvm-install-components=llvm-ar;llvm-cov;llvm-profdata;IndexStore;clang;clang-resource-headers;compiler-rt;clangd;lld;LTO;clang-features-file' --llbuild --swiftpm --swift-driver --xctest --libicu --swiftdocc --build-ninja --install-llvm --install-swift --install-lldb --install-llbuild --install-swiftpm --install-swift-driver --install-swiftsyntax --install-xctest --install-libicu --install-prefix=/usr --install-sourcekit-lsp --install-swiftformat --install-swiftdocc --build-swift-static-stdlib --build-swift-static-sdk-overlay --build-swift-stdlib-unittest-extra --test-installable-package --toolchain-benchmarks --install-destdir=/home/build-user/swift-nightly-install-stage1 --installable-package=/home/build-user/swift-5.10.1-RELEASE-ubuntu2404-stage1.tar.gz --relocate-xdg-cache-home-under-build-subdir --build-subdir=buildbot_linux --lldb --release --test --validation-test --long-test --stress-test --test-optimized --foundation --libdispatch --indexstore-db --sourcekit-lsp --swiftdocc '--lit-args=-v --time-tests' --lldb-test-swift-only --install-foundation --install-libdispatch --reconfigure --no-assertions

@shahmishal shahmishal added build-script Area → utils: The build script and removed task triage needed This issue needs more specific labels labels Aug 26, 2024
@tbkka
Copy link
Contributor

tbkka commented Aug 26, 2024

#76092 fixes a problem which would incorrectly enable certain assertions in release builds.

(Aside: Current builds are expected to have ASSERT assertions enabled always, even in release. This is part of a long-term project to improve code quality. But CONDITIONAL_ASSERT assertions should have been disabled by default in release builds, and only enabled when the appropriate command-line option was enabled. And of course, old-style C assert() assertions should behave the same as ever.)

@shahmishal
Copy link
Member

I don't see lib/Basic/Assertions.cpp file in release/5.10 branch.

@tbkka
Copy link
Contributor

tbkka commented Aug 26, 2024

Oh, right. Yeah, this isn't in the 5.10 branch. So something else.

@shahmishal
Copy link
Member

@etcwilde and @edymtt Can you look into this when you get a chance?

@etcwilde
Copy link
Contributor

Oh, I think I see the bug. Thanks for it reporting this.

@GeorgeLyon
Copy link

Any info on when this will be fixed or if it can be worked-around without rebuilding the full toolchain from scratch? I'm running into some (seemingly spurious?) assertions with parameter packs I'd love to turn off: #76103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-script Area → utils: The build script
Projects
None yet
Development

No branches or pull requests

7 participants
@etcwilde @GeorgeLyon @edymtt @tayloraswift @shahmishal @tbkka and others