Skip to content

Commit e96f9a5

Browse files
[GR-51285] Fix running protobuf on java -truffle in the default configuration.
PullRequest: graal/17429
2 parents 0687f02 + 3e416cd commit e96f9a5

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

espresso/src/com.oracle.truffle.espresso.libjavavm/src/com/oracle/truffle/espresso/libjavavm/LibEspresso.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ static int createJavaVM(@SuppressWarnings("unused") IsolateThread thread, JNIJav
7373
builder.option("java.ExitHost", "true");
7474
builder.option("java.EnableSignals", "true");
7575
builder.option("java.ExposeNativeJavaVM", "true");
76+
builder.option("java.GuestFieldOffsetStrategy", "graal"); // most "hotspot-like"
7677
Context context = builder.build();
7778
context.enter();
7879
Value bindings;

espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/substitutions/Target_sun_misc_Unsafe.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ public static final class SafetyGuestFieldOffsetStrategy implements GuestFieldOf
232232
public int guestOffsetToSlot(long guestOffset) {
233233
int offset = Math.toIntExact(guestOffset);
234234
if (forceStatic(offset)) {
235-
assert offset >= (SAFETY_STATIC_FIELD_OFFSET - ALLOWED_HIDDEN_FIELDS) : "offset: " + offset;
236235
return offset - SAFETY_STATIC_FIELD_OFFSET;
237236
} else {
238237
return offset - SAFETY_FIELD_OFFSET;

0 commit comments

Comments
 (0)