[ https://issues.apache.org/jira/browse/ARROW-13638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17399998#comment-17399998 ]
David Li commented on ARROW-13638: ---------------------------------- This won't work since most APIs are based around non-owning pointers. We can instead add a FunctionOptions::Copy as suggested by [~bkietz]. Also, there are several scalar aggregate kernels that keep a reference to their options instead of a copy - those need fixing. > [C++][R] GroupByNode accesses FunctionOptions after Init/ExecNode_Aggregate > keep_alives aren't kept alive > --------------------------------------------------------------------------------------------------------- > > Key: ARROW-13638 > URL: https://issues.apache.org/jira/browse/ARROW-13638 > Project: Apache Arrow > Issue Type: Bug > Components: C++ > Reporter: David Li > Assignee: David Li > Priority: Major > Labels: query-engine > Fix For: 6.0.0 > > > This causes a use-after-free on function options > [https://github.com/apache/arrow/blob/6f62649392a7e704ad7b730e792b9ba2d62783f6/r/src/compute-exec.cpp#L138-L165] > -- This message was sent by Atlassian Jira (v8.3.4#803005)