mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8146244: compiler/jvmci/code/DataPatchTest.java crashes: SIGSEGV in (getConstClass)getConstClass
Reviewed-by: twisti
This commit is contained in:
parent
a5d7b2b450
commit
0691fac50b
2 changed files with 22 additions and 1 deletions
|
@ -295,6 +295,15 @@ public abstract class TestAssembler {
|
|||
data.putFloat(f);
|
||||
}
|
||||
|
||||
public void align(int alignment) {
|
||||
int pos = data.position();
|
||||
int misaligned = pos % alignment;
|
||||
if (misaligned != 0) {
|
||||
pos += alignment - misaligned;
|
||||
data.position(pos);
|
||||
}
|
||||
}
|
||||
|
||||
private byte[] finish() {
|
||||
return Arrays.copyOf(data.array(), data.position());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue