-
Bug
-
Resolution: Fixed
-
P4
-
None
-
20
-
None
The spec on the methods MemorySegment::long segmentOffset(MemorySegment other) states:
===
The offset is relative to the base address of this segment and can be a negative or positive value. For instance, if both segments are native segments, the resulting offset can be computed as follows:
other.baseAddress().toRawLongValue() - segment.baseAddress().toRawLongValue()
===
The reference to the method baseAddress() is a leftover from old API. It should be changed to address().
Expected assertion is:
===
other.address().toRawLongValue() - segment.address().toRawLongValue()
===
===
The offset is relative to the base address of this segment and can be a negative or positive value. For instance, if both segments are native segments, the resulting offset can be computed as follows:
other.baseAddress().toRawLongValue() - segment.baseAddress().toRawLongValue()
===
The reference to the method baseAddress() is a leftover from old API. It should be changed to address().
Expected assertion is:
===
other.address().toRawLongValue() - segment.address().toRawLongValue()
===