Skip to content

Conversation

@compnerd
Copy link
Member

Ensure that UnsafeMutablePointer.deallocate has the alignment that was
used when invoking UnsafeMutablePointer.allocate. This is required to
ensure that the appropriate free function is invoked. We would
previously fail on Windows as the allocation would use malloc and due
to the value being -1, use _aligned_free instead when deallocating.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

Ensure that UnsafeMutablePointer.deallocate has the alignment that was
used when invoking UnsafeMutablePointer.allocate.  This is required to
ensure that the appropriate `free` function is invoked.  We would
previously fail on Windows as the allocation would use `malloc` and due
to the value being `-1`, use `_aligned_free` instead when deallocating.
@compnerd
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 381cae6

@compnerd
Copy link
Member Author

@swift-ci please test Linux platform

@compnerd
Copy link
Member Author

CC: @mikeash

@compnerd compnerd merged commit ab37099 into swiftlang:master Nov 21, 2018
@compnerd compnerd deleted the alignment branch November 21, 2018 17:34
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