softhsm: fix segment violation at application end #19190
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix a segmentation violation at application termination through a combination of a couple of commits cherry-picked from upstream post-2.6.1 and a contribution from mouse07410 directed at the same issue.
Closes: https://trac.macports.org/ticket/64036
Description
The SEGV in question has been seen in a couple of circumstances, as mentioned in the ticket. One is in the face of multiple OpenSSL engines and the other is through use of the PKCS11 bridge from Java. This has been largely fixed upstream (although this includes an additional contribution which may also help in the first problem case).
I believe the issue wasn't always apparent, but appeared when some changes were made to the underlying OpenSSL implementation.
There seems little chance that the upstream project will see another release soon, or perhaps ever. This patch gets the MacPorts version back to functionality; the only alternative for users would be to build from the upstream development branch sources themselves.
Type(s)
Tested on
macOS 13.4 22F66 x86_64
Xcode 14.3.1 14E300c
Verification
Have you
port lint --nitpick
?sudo port test
?sudo port -vst install
?