Skip to content

Commit 6885890

Browse files
Ensure that the GIL is held when releasing references to ArrowArray
objects when exported Arrow buffers are released by the consumer. In some circumstances this could cause a segfault.
1 parent 35b82f6 commit 6885890

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

doc/src/release_notes.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ Common Changes
4646
``ArrowArray`` objects are now available in Python plugins such as those
4747
found in VS Code
4848
- Upgraded Arrow C Data (nanoarrow) API version to 0.7.0
49+
- Ensure that the GIL is held when releasing references to ``ArrowArray``
50+
objects when exported Arrow buffers are released by the consumer. In
51+
some circumstances this could cause a segfault.
4952

5053
Note the data frame support in python-oracledb 3.3 is a pre-release, and
5154
may change in a future version

src/oracledb/impl/arrow/utils.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ cdef int append_uint32_array(ArrowArray *arrow_array,
219219

220220

221221
cdef void arrow_buffer_dealloc_callback(ArrowBufferAllocator *allocator,
222-
uint8_t *ptr, int64_t size):
222+
uint8_t *ptr,
223+
int64_t size) noexcept with gil:
223224
"""
224225
ArrowBufferDeallocatorCallback for an ArrowBuffer borrowed from an Arrow
225226
array.

0 commit comments

Comments
 (0)