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
{{ message }}
Repository navigation
Byte-array elements leak in FromSchemaByteArray() #1205
GetByteArrayElements() returns a pointer that must be paired with ReleaseByteArrayElements().
ARROW_ASSIGN_OR_RAISE returns immediately when ReadSchema() returns an
error. On that path, the release below the macro is skipped, so the acquired
array elements remain unreleased:
GetByteArrayElements succeeds
-> ReadSchema returns an error
-> ARROW_ASSIGN_OR_RAISE returns
-> ReleaseByteArrayElements is skipped
The function is used by the public native createDataset() method:
Malformed, corrupted, or incompatible serialized schema bytes can therefore
reach this path. Repeated failed calls can retain copied array buffers or keep
Java arrays pinned, depending on the JVM implementation.
Suggested fix: release the elements before propagating the parse result, for
example:
Activity
apacheGH-1205: Add regression test for byte-array element leak in Fro…
apacheGH-1205: Clarify TestFromSchemaByteArray guards the error path,…
Merge branch 'apache:main' into apachegh-1205-fix-schema-bytearray-leak
apacheGH-1205: Fix byte-array element leak in FromSchemaByteArray by …
apacheGH-1205: Add regression test for byte-array element leak in Fro…
apacheGH-1205: Clarify TestFromSchemaByteArray guards the error path,…
apacheGH-1205: Fix byte-array element leak in FromSchemaByteArray (ap…