netty5/common/src
Norman Maurer 5c1c14286d Allow negative memoryAddress when calling PlatformDependent0.newDirectBuffer(...)
Motivation:

When UNSAFE.allocateMemory is returning an address whose high bit is set we currently throw an IllegalArgumentException. This is not correct as it may return a negative number on at least sparc.

Modifications:

- Allow to pass in negative memoryAddress
- Add unit tests

Result:

Correctly validate the memoryAddress and so also work on sparc as expected. Fixes [#6574].
2017-03-29 22:33:34 +02:00
..
main Allow negative memoryAddress when calling PlatformDependent0.newDirectBuffer(...) 2017-03-29 22:33:34 +02:00
test Allow negative memoryAddress when calling PlatformDependent0.newDirectBuffer(...) 2017-03-29 22:33:34 +02:00