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

[SR-4370] Using optimizer leads to broken module. #46949

Open
dabrahams opened this issue Mar 27, 2017 · 5 comments
Open

[SR-4370] Using optimizer leads to broken module. #46949

dabrahams opened this issue Mar 27, 2017 · 5 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software optimized only Flag: An issue whose reproduction requires optimized compilation

Comments

@dabrahams
Copy link
Collaborator

Previous ID SR-4370
Radar rdar://problem/31331438
Original Reporter @dabrahams
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash, OptimizedOnly
Assignee @bob-wilson
Priority Medium

md5: c087f96ac84659eb8a8e11f2621e63db

Issue Description:

with

$ git fetch https://github.com/dabrahams/swift refs/bugs/external-or-weak:BUG && git checkout BUG

Build the compiler, then build the Prototypes/AU3.swift test:

rm -rf /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/Prototypes/Output/AU3.swift.gyb.tmp && mkdir -p /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/Prototypes/Output/AU3.swift.gyb.tmp && /Users/Shared/dabrahams/s/swift/utils/gyb -DWORD_BITS=64 /Users/Shared/dabrahams/s/swift/test/Prototypes/AU3.swift.gyb -o /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/Prototypes/Output/AU3.swift.gyb.tmp/out.swift && /Users/Shared/dabrahams/s/swift/utils/line-directive /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/Prototypes/Output/AU3.swift.gyb.tmp/out.swift -- xcrun --toolchain default --sdk /Applications/Xcode-8E161.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/./bin/swiftc -target x86_64-apple-macosx10.9  -module-cache-path '/var/folders/8v/9769m3ps7ds7h9pg23lzcls00000gn/T/swift-testsuite-clang-module-cacheXN5T7Q' -F /Applications/Xcode-8E161.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/../../../Developer/Library/Frameworks -Xlinker -rpath -Xlinker /Applications/Xcode-8E161.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/../../../Developer/Library/Frameworks  -swift-version 3  /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/Prototypes/Output/AU3.swift.gyb.tmp/out.swift -o /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/Prototypes/Output/AU3.swift.gyb.tmp/a.out -O && /Users/Shared/dabrahams/s/swift/utils/line-directive /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/Prototypes/Output/AU3.swift.gyb.tmp/out.swift --  /Users/Shared/dabrahams/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/Prototypes/Output/AU3.swift.gyb.tmp/a.out
Global is external, but doesn't have external or weak linkage!
i8** @_T0SC25__swift_stdlib_UErrorCodeVs16RawRepresentable10SwiftShimsWP
LLVM ERROR: Broken module found, compilation aborted!

If you remove -O, it builds just fine.

@belkadan
Copy link
Contributor

cc aschwaighofer@apple.com (JIRA User), @swiftix

@dabrahams
Copy link
Collaborator Author

@swift-ci create

@dabrahams
Copy link
Collaborator Author

This is still failing and should be considered a blocker, because this code is going into the standard library. There's always a chance the problem won't reproduce when we do that, but I wouldn't count on it.

@dabrahams
Copy link
Collaborator Author

Assigning to Ewa to get some traction

@dabrahams
Copy link
Collaborator Author

I think this is no longer blocking us. We have new blockers now 🙁

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 2022
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. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software optimized only Flag: An issue whose reproduction requires optimized compilation
Projects
None yet
Development

No branches or pull requests

3 participants