Skip to content

Commit

Permalink
[GR-51285] Fix running protobuf on java -truffle in the default confi…
Browse files Browse the repository at this point in the history
…guration.

PullRequest: graal/17429
  • Loading branch information
gilles-duboscq committed Apr 5, 2024
2 parents 0687f02 + 3e416cd commit e96f9a5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ static int createJavaVM(@SuppressWarnings("unused") IsolateThread thread, JNIJav
builder.option("java.ExitHost", "true");
builder.option("java.EnableSignals", "true");
builder.option("java.ExposeNativeJavaVM", "true");
builder.option("java.GuestFieldOffsetStrategy", "graal"); // most "hotspot-like"
Context context = builder.build();
context.enter();
Value bindings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ public static final class SafetyGuestFieldOffsetStrategy implements GuestFieldOf
public int guestOffsetToSlot(long guestOffset) {
int offset = Math.toIntExact(guestOffset);
if (forceStatic(offset)) {
assert offset >= (SAFETY_STATIC_FIELD_OFFSET - ALLOWED_HIDDEN_FIELDS) : "offset: " + offset;
return offset - SAFETY_STATIC_FIELD_OFFSET;
} else {
return offset - SAFETY_FIELD_OFFSET;
Expand Down

0 comments on commit e96f9a5

Please sign in to comment.