- 
    Type:
Bug
 - 
    Resolution: Duplicate
 - 
    Priority:
  P4                     
     - 
    Affects Version/s: 24
 - 
    Component/s: core-libs
 
- 
        x86
 - 
        linux
 
                    ADDITIONAL SYSTEM INFORMATION :
32Bit System!
A DESCRIPTION OF THE PROBLEM :
running the testcode on a 32bit system I got the following exception:
java.lang.IllegalArgumentException: filterFromTarget filter type does not match target var handle type: (long)MemorySegment, int
The addresses are java int not long on 32bit systems.
REGRESSION : Last worked in version 23.0.2
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
run provided junit test case.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
test pass
ACTUAL -
exception thrown
---------- BEGIN SOURCE ----------
@Test
public void testSetAddressOn32bitAdresses() {
final Arena arena = Arena.ofConfined();
final MemorySegment mem = arena.allocate(1024);
//next call fails on i386!
mem.set(ValueLayout.ADDRESS, 0, MemorySegment.ofAddress(0xfedcba9876543210L));
MemorySegment ms = mem.get(ValueLayout.ADDRESS, 0);
//make sure we do fail on 64 bit!!
Assertions.assertEquals("0", Long.toHexString(ms.address() & 0xffffffff00000000L), "Please do not test on 64 bit system, its a 32 bit bug!");
Assertions.assertEquals("76543210", Long.toHexString(ms.address()));
}
---------- END SOURCE ----------
32Bit System!
A DESCRIPTION OF THE PROBLEM :
running the testcode on a 32bit system I got the following exception:
java.lang.IllegalArgumentException: filterFromTarget filter type does not match target var handle type: (long)MemorySegment, int
The addresses are java int not long on 32bit systems.
REGRESSION : Last worked in version 23.0.2
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
run provided junit test case.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
test pass
ACTUAL -
exception thrown
---------- BEGIN SOURCE ----------
@Test
public void testSetAddressOn32bitAdresses() {
final Arena arena = Arena.ofConfined();
final MemorySegment mem = arena.allocate(1024);
//next call fails on i386!
mem.set(ValueLayout.ADDRESS, 0, MemorySegment.ofAddress(0xfedcba9876543210L));
MemorySegment ms = mem.get(ValueLayout.ADDRESS, 0);
//make sure we do fail on 64 bit!!
Assertions.assertEquals("0", Long.toHexString(ms.address() & 0xffffffff00000000L), "Please do not test on 64 bit system, its a 32 bit bug!");
Assertions.assertEquals("76543210", Long.toHexString(ms.address()));
}
---------- END SOURCE ----------
- caused by
 - 
                    
JDK-8338677 Improve startup of memory access var handles by simplifying combinator chains
-         
     - Resolved
 
 -         
 
- duplicates
 - 
                    
JDK-8350118 Simplify the layout access VarHandle
-         
     - Resolved
 
 -