PATCH: swapped usage of idx_t and bm_word_t types in parMarkBitMap.cpp

Dan Horák dan at danny.cz
Thu May 22 09:59:47 UTC 2014


On Thu, 22 May 2014 11:23:48 +0200
Thomas Schatzl <thomas.schatzl at oracle.com> wrote:

> Hi Dan,
> 
> On Thu, 2014-05-22 at 10:19 +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/gc_implementation/parallelScavenge/parMarkBitMap.cpp
> > 
> > The code currently uses a pointer to idx_t as an argument to
> >  BitMap::set_map(bm_word_t* map) which fails on s390.
> > 
> > For most platforms the idx_t and bm_word_t 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".
> > 
> > This a follow-up of my earlier s390 related patch [2]
> > 
> > [1] http://fedora.danny.cz/openjdk/bitmap-1/webrev/
> > [2]
> > http://mail.openjdk.java.net/pipermail/hotspot-dev/2013-September/010913.html
> > 
> > Note: I'm Red Hat employee (dhorak at redhat.com), so I should be
> > covered by Red Hat's CLA for my contributions.
> > 
> 
> Created https://bugs.openjdk.java.net/browse/JDK-8043722 .
> 
> I roughly looked at other similar changes, shouldn't line 129 in
> g1/concurrentMark.cpp changed too?
> 
> 129  _bm.set_map((uintptr_t*)_virtual_space.low());
> 
> @Compiler team: what about the instantiations of MethodLivenessResult?
> 
> I.e. in methodLiveness.cpp:476 and 1001 there are two other uintptr_t*
> casts.

they don't fail the build because bm_word_t is uintptr_t, but in my
opinion they should be changed too, at least for consistency


		Dan


More information about the hotspot-dev mailing list