You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GH-36669: [Go] Guard against garbage in C Data structures (#36670)
### Rationale for this change
Prevent hard to debug crashes when using Go code with other code via C Data Interface.
### What changes are included in this PR?
In the C Stream Interface implementation, jump through a trampoline that zeroes the out parameters before letting Go see them.
Note that this can only guard against the issue when the C Stream Interface is used.
Also, fix other issues in the C Data Interface tests with invalid pointers and uninitialized memory that were turned up by the new test here (because it calls `runtime.GC` very frequently).
### Are these changes tested?
Yes
### Are there any user-facing changes?
No
**This PR contains a "Critical Fix".**
* Closes: #36669
Lead-authored-by: David Li <[email protected]>
Co-authored-by: Matt Topol <[email protected]>
Signed-off-by: David Li <[email protected]>
0 commit comments