8244420: Shenandoah: Ensure _disarmed_value offset < 128

Reviewed-by: rkennke
This commit is contained in:
Zhengyu Gu 2020-05-05 12:32:40 -04:00
parent 704749a094
commit 5ac755681f

View File

@ -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 @@ private:
_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() {