OSDN Git Service

Fix RTP to hold mutator lock while using raw mirror pointers.
authorVladimir Marko <vmarko@google.com>
Wed, 20 Apr 2016 14:06:31 +0000 (15:06 +0100)
committerVladimir Marko <vmarko@google.com>
Wed, 20 Apr 2016 14:20:20 +0000 (15:20 +0100)
commit62977ff198deb673a6990202a2fb8b993217c57c
treea935f37990e67d5deb3ce238484c5d60f2c8fc41
parentac6d660672c21a0ace14276e9c356906218b4412
Fix RTP to hold mutator lock while using raw mirror pointers.

ReferenceTypePropagation::RTPVisitor::SetClassAsTypeInfo()
is taking a raw mirror::Class* parameter, so it must be
marked with SHARED_REQUIRES(Locks::mutator_lock_). The
omission of this annotation allowed
    https://android-review.googlesource.com/216926
to compile despite using GC-unsafe raw mirror pointers in
UpdateFieldAccessTypeInfo(). This led to test failures in
the debug-GC mode.

Change-Id: I2a743070c642e7a611480e5d495af44f0945e43f
compiler/optimizing/reference_type_propagation.cc