Commits


David Li authored and GitHub committed b9759776535
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 <li.davidm96@gmail.com> Co-authored-by: Matt Topol <zotthewizard@gmail.com> Signed-off-by: David Li <li.davidm96@gmail.com>