Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
8244420: Shenandoah: Ensure _disarmed_value offset < 128
Browse files Browse the repository at this point in the history
Reviewed-by: rkennke
  • Loading branch information
zhengyu123 committed May 5, 2020
1 parent 704749a commit 5ac7556
Showing 1 changed file with 5 additions and 1 deletion.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2019, Red Hat, Inc. All rights reserved.
* Copyright (c) 2018, 2020, Red Hat, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -56,6 +56,10 @@ class ShenandoahThreadLocalData {
_worker_id(INVALID_WORKER_ID),
_force_satb_flush(false),
_disarmed_value(ShenandoahCodeRoots::disarmed_value()) {

// At least on x86_64, nmethod entry barrier encodes _disarmed_value offset
// in instruction as disp8 immed
assert(in_bytes(disarmed_value_offset()) < 128, "Offset range check");
}

~ShenandoahThreadLocalData() {
Expand Down

0 comments on commit 5ac7556

Please sign in to comment.