Skip to content

Fix a couple of check-swift-validation-optimize test failures #22834

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 2 commits into from
Feb 23, 2019

Conversation

slavapestov
Copy link
Contributor

A bot runs tests in this configuration. One failure was a test where the relevant runtime call was optimized away. The other problem was a regression from #22736. I added a reduced test case that doesn't depend on the optimizer.

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@shahmishal
Copy link
Member

16:31:25 Test Case 'TestURLSession.test_dataTaskWithHttpInputStream' started at 2019-02-23 00:31:07.067
16:31:25 /home/buildnode/jenkins/workspace/swift-PR-Linux-smoke-test/branch-master/swift-corelibs-foundation/TestFoundation/TestURLSession.swift:170: error: TestURLSession.test_dataTaskWithHttpInputStream : XCTAssertEqual failed: ("1316 bytes") is not equal to ("1323 bytes") - Response Data and Data is not equal
16:31:25 Test Case 'TestURLSession.test_dataTaskWithHttpInputStream' failed (0.003 seconds)

…ations are on

@_optimize(none) does not prevent LLVM from optimizing the function, and the LLVM
optimizer was able to inline blackHole() and elide the metadata access altogether.
We have to set the SILFunction's 'weakLinked' flag in the defining
module too, so that it can be serialized. Otherwise when we
deserialize it we are not weak linking calls to the function.
@slavapestov slavapestov force-pushed the fix-optimized-test-failures branch from 5f59b64 to b9bda84 Compare February 23, 2019 02:10
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test macOS

1 similar comment
@shahmishal
Copy link
Member

@swift-ci Please smoke test macOS

@slavapestov
Copy link
Contributor Author

swiftlang/swift-corelibs-foundation#1939
@swift-ci Please smoke test Linux

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test Linux

@slavapestov slavapestov merged commit 3300d1a into swiftlang:master Feb 23, 2019
slavapestov added a commit to slavapestov/swift that referenced this pull request Mar 2, 2019
I meant to check this in a while ago; it was part of
swiftlang#22834.
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.

2 participants