From 58ba2bad8edeb4d6bd563dfdf5848b65641ea329 Mon Sep 17 00:00:00 2001 From: tschatzl Date: Mon, 10 Feb 2014 10:34:52 +0100 Subject: 8033545: Missing volatile specifier in Bitmap::par_put_range_within_word Summary: The method Bitmap::par_put_range_within_word reloads the original value during a CAS, which may be optimized away. Instead of reloading, use the value returned by Atomic::cmpxchg_ptr() for further processing. Reviewed-by: tschatzl, brutisso, tonyp Contributed-by: Matthias Braun --- src/share/vm/utilities/bitMap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/share/vm/utilities') diff --git a/src/share/vm/utilities/bitMap.cpp b/src/share/vm/utilities/bitMap.cpp index b67604887..8431395a6 100644 --- a/src/share/vm/utilities/bitMap.cpp +++ b/src/share/vm/utilities/bitMap.cpp @@ -107,7 +107,7 @@ void BitMap::par_put_range_within_word(idx_t beg, idx_t end, bool value) { while (true) { intptr_t res = Atomic::cmpxchg_ptr(nw, pw, w); if (res == w) break; - w = *pw; + w = res; nw = value ? (w | ~mr) : (w & mr); } } -- cgit v1.2.3 From 315a386fe13df6c7c48ff250585370d9e2db62eb Mon Sep 17 00:00:00 2001 From: coleenp Date: Fri, 7 Feb 2014 18:30:27 -0500 Subject: 8033528: assert(0 <= i && i < length()) failed: index out of bounds Summary: Restoring bytecodes for invokedynamic had wrong index calculation added testing stress option. Reviewed-by: twisti, hseigel --- src/share/vm/utilities/array.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/share/vm/utilities') diff --git a/src/share/vm/utilities/array.hpp b/src/share/vm/utilities/array.hpp index 9f8e45f32..0fbcd94d2 100644 --- a/src/share/vm/utilities/array.hpp +++ b/src/share/vm/utilities/array.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. 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 @@ -58,7 +58,7 @@ class ResourceArray: public ResourceObj { void initialize(size_t esize, int length) { assert(length >= 0, "illegal length"); - assert(_data == NULL, "must be new object"); + assert(StressRewriter || _data == NULL, "must be new object"); _length = length; _data = resource_allocate_bytes(esize * length); DEBUG_ONLY(init_nesting();) -- cgit v1.2.3