diff options
author | Orion Hodson <oth@google.com> | 2020-07-10 13:31:35 +0100 |
---|---|---|
committer | Orion Hodson <oth@google.com> | 2020-07-10 18:18:48 +0000 |
commit | 7285a4bc7337cf6382ac464b979ae5db986a2a53 (patch) | |
tree | b2cf6bf95ec431a2f7bb0d4c049aac3b737ef43d /compiler/optimizing/codegen_test_utils.h | |
parent | 8070443ce4b31a6787c22490f18f838f8f6ed4be (diff) |
Fix GetDirectBufferCapacity for zero length direct buffer
It is possible to create a direct buffer that has a null address and
zero size, e.g. mapping a FileChannel on a zero-length file. In this
case, GetDirectBufferCapacity() should return zero rather than -1.
Bug: 122025675
Test: art/test/run-test --host 2036-jni-filechannel
Test: art/test.py --target -r -t 2036-jni-filechannel
Test: art_runtime_tests
Change-Id: If615025385a8dfad00d815da128dfde19d2ddbc2
Diffstat (limited to 'compiler/optimizing/codegen_test_utils.h')
0 files changed, 0 insertions, 0 deletions