-
Bug
-
Resolution: Fixed
-
P3
-
19
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8290186 | 20 | Jorn Vernee | P3 | Resolved | Fixed | b06 |
JDK-8291417 | 19.0.2 | Jorn Vernee | P3 | Resolved | Fixed | b01 |
JDK-8291293 | 19.0.1 | Jorn Vernee | P3 | Resolved | Fixed | b04 |
Specificaition of method VaList::skip is rather short
> Skips a number of elements with the given memory layouts, and advances this variable argument list's position.
It's not perfectly clear what would for example produce the following code
try (var session = MemorySession.openConfined()) {
VaList vaList = VaList.make(builder -> builder.addVarg(ValueLayout.JAVA_INT, 77)
.addVarg(ValueLayout.JAVA_LONG, -78),
session);
vaList.skip(ValueLayout.JAVA_DOUBLE, ValueLayout.JAVA_BOOLEAN);
System.out.println(vaList.nextVarg(ValueLayout.JAVA_INT));
}
On MacOS x86 the result is
-78
In the OpenJDK implementation behaves correctly, the spec of ::skip would benefit from more detailed explaination or some references or hints.
> Skips a number of elements with the given memory layouts, and advances this variable argument list's position.
It's not perfectly clear what would for example produce the following code
try (var session = MemorySession.openConfined()) {
VaList vaList = VaList.make(builder -> builder.addVarg(ValueLayout.JAVA_INT, 77)
.addVarg(ValueLayout.JAVA_LONG, -78),
session);
vaList.skip(ValueLayout.JAVA_DOUBLE, ValueLayout.JAVA_BOOLEAN);
System.out.println(vaList.nextVarg(ValueLayout.JAVA_INT));
}
On MacOS x86 the result is
-78
In the OpenJDK implementation behaves correctly, the spec of ::skip would benefit from more detailed explaination or some references or hints.
- backported by
-
JDK-8290186 Specification of method j.l.foreign.VaList::skip deserves clarification
-
- Resolved
-
-
JDK-8291293 Specification of method j.l.foreign.VaList::skip deserves clarification
-
- Resolved
-
-
JDK-8291417 Specification of method j.l.foreign.VaList::skip deserves clarification
-
- Resolved
-
- clones
-
JDK-8289148 j.l.foreign.VaList::nextVarg call could throw IndexOutOfBoundsException or even crash the VM
-
- Resolved
-
- is cloned by
-
JDK-8291359 Specification of method j.l.foreign.VaList::skip still deserves clarification
-
- Resolved
-
(2 links to)