Skip to content
Permalink
Browse files
8244420: Shenandoah: Ensure _disarmed_value offset < 128
Reviewed-by: rkennke
  • Loading branch information
zhengyu123 committed May 5, 2020
1 parent 704749a commit 5ac755681fa182c804d243e13a3d8905f6e6584f
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/hotspot/share/gc/shenandoah/shenandoahThreadLocalData.hpp
@@ -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
@@ -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() {

0 comments on commit 5ac7556

Please sign in to comment.