Skip to content

Conversation

qmuntal
Copy link
Member

@qmuntal qmuntal commented Sep 26, 2025

Copy the code generation improvements and cleanups we did in golang-fips/openssl#288. The most notable change, and the only that has a runtime effect, is using runtime.KeepAlive for all pointer parameters of the nocgo wrappers. Doing so doesn't have any performance impact, but it instruct the garbage collector to not collect the pointer down-casted to a uintptr until the C call is done. Not doing so could introduce memory corruptions on high-load situations.

@qmuntal qmuntal requested a review from gdams September 26, 2025 14:01
@qmuntal qmuntal requested a review from a team as a code owner September 26, 2025 14:02
@qmuntal qmuntal merged commit 05c51df into main Sep 29, 2025
33 checks passed
@qmuntal qmuntal deleted the dev/qmuntal/cgolessimp branch September 29, 2025 07:25
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