Skip to content

[SwiftShims] Make the void* arguments of memcmp nullable #36666

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
Apr 5, 2021

Conversation

xymus
Copy link
Contributor

@xymus xymus commented Mar 31, 2021

This should correspond to the definition of memcmp in usr/include/string.h and keep it from being a source of confusion for the compiler.

rdar://69876253

@xymus xymus requested a review from beccadax March 31, 2021 00:15
@xymus
Copy link
Contributor Author

xymus commented Mar 31, 2021

@swift-ci Please smoke test

1 similar comment
@xymus
Copy link
Contributor Author

xymus commented Mar 31, 2021

@swift-ci Please smoke test

@xymus
Copy link
Contributor Author

xymus commented Mar 31, 2021

@swift-ci Please smoke test macOS

@xymus
Copy link
Contributor Author

xymus commented Mar 31, 2021

On Linux we're getting the opposite error now:

Cross-reference to 'memcmp.with type (Optional<UnsafeRawPointer>, Optional<UnsafeRawPointer>, Int) -> Int32' in module 'CDispatch'

instead of the previous error on macOS: (The error format changed since then and I'm there's a problem in it.)

*** DESERIALIZATION FAILURE (please include this section in any bug report) ***
top-level value not found
Cross-reference to module 'Darwin'
... memcmp
... with type (UnsafeRawPointer, UnsafeRawPointer, Int) -> Int32

@xymus xymus force-pushed the nullable-memcmp branch from a20bb03 to 9f5cf80 Compare March 31, 2021 21:00
@xymus
Copy link
Contributor Author

xymus commented Mar 31, 2021

@swift-ci Please smoke test

@beccadax
Copy link
Contributor

beccadax commented Apr 1, 2021

@swift-ci please smoke test

This should correspond to the definition of memcmp in
usr/include/string.h and keep it from being a source of confusion for
the compiler.

rdar://69876253
@xymus xymus force-pushed the nullable-memcmp branch from 9f5cf80 to 36f7f1b Compare April 2, 2021 17:39
@xymus
Copy link
Contributor Author

xymus commented Apr 2, 2021

@swift-ci please smoke test

@xymus
Copy link
Contributor Author

xymus commented Apr 2, 2021

The libs compiled fine under Linux this time but the test failed.

@swift-ci please smoke test

@xymus xymus force-pushed the nullable-memcmp branch from 74c4ae8 to c6acc94 Compare April 2, 2021 22:35
@xymus
Copy link
Contributor Author

xymus commented Apr 2, 2021

@swift-ci please smoke test

@xymus
Copy link
Contributor Author

xymus commented Apr 3, 2021

@swift-ci Please smoke test macOS

@xymus
Copy link
Contributor Author

xymus commented Apr 5, 2021

@swift-ci please smoke test

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