PATCH: swapped usage of idx_t and bm_word_t types in bitMap.inline.hpp
Bengt Rutisson
bengt.rutisson at oracle.com
Tue Sep 17 02:48:20 PDT 2013
Hello Dan and Thomas,
The change looks good to me to. Thanks for finding and fixing this!
Bengt
On 9/17/13 10:27 AM, Thomas Schatzl wrote:
> Hi,
>
> On Mon, 2013-09-16 at 12:09 +0200, Dan Horák wrote:
>> Hello,
>>
>> I've created a patch [1] to fix swapped usage of idx_t and bm_word_t
>> types in hotspot/src/share/vm/utilities/bitMap.inline.hpp
>>
>> The code in hotspot/src/share/vm/utilities/bitMap.inline.hpp
>> incorrectly swaps the usage of the idx_t and bm_word_t types. For most
>> platforms these 2 types are effectively the same, so the interchange is
>> uncaught, but on s390 (32-bit) the size_t is "unsigned long" which
>> makes it incompatible with "unsigned int". The patch is result of my
>> understanding of the logic inside bitMap.inline.hpp, so it needs
>> definitely a review although I think I'm right :-) The same patch is
>> used in our openjdk7 Fedora packages and the code compiles and works
>> without issue on both s390 and s390x architectures there.
>>
>> from bitmap.hpp
>>
>> typedef size_t idx_t; // Type used for bit and word indices.
>> typedef uintptr_t bm_word_t; // Element type of array that represents
>> // the bitmap.
>>
>>
>> [1] http://fedora.danny.cz/openjdk/bitmap/webrev/
> I created the bug JDK-8024914 (
> https://bugs.openjdk.java.net/browse/JDK-8024914) - the bug tracker is
> publicly open now to track this btw.
>
> Looks good to me. Need a review from a Reviewer still though. I can
> shepherd it further after that.
>
> Thanks for your contribution,
> Thomas
>
>
More information about the hotspot-dev
mailing list