Skip to content
Commit 4174b769 authored by Orion Hodson's avatar Orion Hodson
Browse files

Ensure all fields of AutoBufferPointer are initialized

In the process of revising libnativehelper interface, the
initialization of the fArray field was dropped. This change fixes
this and adds regression tests.

In writing the tests, it became apparent that the AutoBufferPointer
destructor would crash if the underlying buffer was heap array backed
and the buffer position was non-zero. ReleasePrimitiveArrayCritical
was called with the element corresponding to the current position
rather than the first element.

Bug: b/130390512
Test: atest FrameworksCoreTests:android.graphics.BitmapTest

(cherry picked from commit e522c994)

Merged-In: I319512aaede7ba8af5d013c9281417695abf9099
Change-Id: I319512aaede7ba8af5d013c9281417695abf9099
parent df573a62
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment