Skip to content

Revert "embedded: allow dead function elimination for de-serialized functions" #72156

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

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

Michael137
Copy link
Contributor

Reverts #72124

The LLDB test lang/swift/embedded/expr/TestSwiftEmbeddedExpression.py is failing on the incremental build bot: https://ci.swift.org/view/LLDB/job/oss-lldb-incremental-macos-cmake/ which is blocking PR testing

UNRESOLVED: lldb-api :: lang/swift/embedded/expr/TestSwiftEmbeddedExpression.py (1021 of 2450)
******************** TEST 'lldb-api :: lang/swift/embedded/expr/TestSwiftEmbeddedExpression.py' FAILED ********************
Script:
--
/Applications/Xcode-beta.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/bin/python3.9 /Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --inferior-env DYLD_LIBRARY_PATH="/Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/swift-macosx-x86_64/lib/swift/macosx:/Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/lldb-macosx-x86_64/./lib/lldb/clang/lib/darwin" --inferior-env LD_LIBRARY_PATH="/Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/swift-macosx-x86_64/lib/swift/x86_64" --inferior-env SIMCTL_CHILD_DYLD_LIBRARY_PATH="/Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/swift-macosx-x86_64/lib/swift/macosx" --env OBJCOPY=/Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/llvm-macosx-x86_64/./bin/llvm-objcopy --out-of-tree-debugserver --env LLVM_LIBS_DIR=/Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/llvm-macosx-x86_64/./lib --env LLDB_LIBS_DIR=/Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/lldb-macosx-x86_64/./lib --env LLVM_INCLUDE_DIR=/Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/llvm-macosx-x86_64/include --env LLVM_TOOLS_DIR=/Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/llvm-macosx-x86_64/./bin --libcxx-include-dir /Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/libcxx-macosx-x86_64/include/c++/v1 --libcxx-library-dir /Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/libcxx-macosx-x86_64/lib --arch x86_64 --build-dir /Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/lldb-macosx-x86_64/lldb-test-build.noindex --lldb-module-cache-dir /Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/lldb-macosx-x86_64/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/lldb-macosx-x86_64/lldb-test-build.noindex/module-cache-clang/lldb-api --swift-libs-dir /Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/swift-macosx-x86_64/lib/swift --executable /Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/lldb-macosx-x86_64/./bin/lldb --compiler /Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/llvm-macosx-x86_64/./bin/clang --swift-compiler /Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/swift-macosx-x86_64/bin/swiftc --dsymutil /Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/llvm-macosx-x86_64/./bin/dsymutil --llvm-tools-dir /Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/llvm-macosx-x86_64/./bin --lldb-libs-dir /Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/lldb-macosx-x86_64/./lib --framework /Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/lldb-macosx-x86_64/bin/LLDB.framework --skip-category=swiftmaccatalyst --build-dir /Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/lldb-macosx-x86_64/lldb-test-build.noindex --skip-category=watchpoint --setting symbols.use-swift-clangimporter=true --setting symbols.swift-precise-compiler-invocation=true /Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/llvm-project/lldb/test/API/lang/swift/embedded/expr -p TestSwiftEmbeddedExpression.py
--
Exit Code: -6

Command Output (stdout):
--
lldb version 17.0.0 (https://github.com/apple/llvm-project.git revision 736f2dc428eebfdee4c2821791c277f5d4db4de5)
Swift version 6.0-dev (LLVM 736f2dc428eebfd, Swift d70ce6bb340d011)

--
Command Output (stderr):
--
SIL verification failed: hidden-external function cannot have a body: F->isExternalDeclaration()
In function:
// A.foo()
sil hidden_external [serialized] [canonical] [ossa] @$s1a1AV3fooSiyF : $@convention(method) (A) -> Int {
// %0                                             // users: %2, %1
bb0(%0 : $A):
  %1 = struct_extract %0 : $A, #A.field           // user: %3
  %2 = struct_extract %0 : $A, #A.field           // user: %4
  %3 = struct_extract %1 : $Int, #Int._value      // user: %6
  %4 = struct_extract %2 : $Int, #Int._value      // user: %6
  %5 = integer_literal $Builtin.Int1, -1          // user: %6
  %6 = builtin "smul_with_overflow_Int64"(%3 : $Builtin.Int64, %4 : $Builtin.Int64, %5 : $Builtin.Int1) : $(Builtin.Int64, Builtin.Int1) // user: %7
  (%7, %8) = destructure_tuple %6 : $(Builtin.Int64, Builtin.Int1) // users: %10, %9
  cond_fail %8 : $Builtin.Int1, "arithmetic overflow" // id: %9
  %10 = struct $Int (%7 : $Builtin.Int64)         // user: %11
  return %10 : $Int                               // id: %11
} // end sil function '$s1a1AV3fooSiyF'

PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	HandleCommand(command = "expr a.foo()")
1.	While evaluating request ExecuteSILPipelineRequest(Run pipelines { Mandatory Diagnostic Passes + Enabling Optimization Passes } on SIL for __lldb_expr_1)
2.	While running pass #25 SILModuleTransform "MandatorySILLinker".
3.	While verifying SIL function "@$s1a1AV3fooSiyF".
 for 'foo()' (in module 'a')

--

@Michael137
Copy link
Contributor Author

@swift-ci test

@adrian-prantl
Copy link
Contributor

@swift-ci smoke test

@adrian-prantl adrian-prantl enabled auto-merge March 7, 2024 19:11
@xymus xymus disabled auto-merge March 7, 2024 21:14
@xymus xymus merged commit 1a84094 into main Mar 7, 2024
@xymus xymus deleted the revert-72124-fix-embedded-dead-code-elim branch March 7, 2024 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants