OSDN Git Service

Disable read barrier thunks for heap poisoning
authorMathieu Chartier <mathieuc@google.com>
Mon, 17 Apr 2017 19:50:45 +0000 (12:50 -0700)
committerMathieu Chartier <mathieuc@google.com>
Mon, 17 Apr 2017 19:50:45 +0000 (12:50 -0700)
Logic to unpoison is not yet implemented, this causes SIGSEGVs in
various places.

Bug: 29516974
Bug: 30126666
Bug: 36141117

Test: ./test/testrunner/testrunner.py -j4 --optimizing --debuggable --ndebuggable --target --verbose
Change-Id: I8317a142d07af36090d5f05ce46100dfa07c17e7

compiler/optimizing/code_generator_arm64.cc

index 8faaec1..4955562 100644 (file)
@@ -90,8 +90,9 @@ static constexpr uint32_t kPackedSwitchCompareJumpThreshold = 7;
 constexpr uint32_t kReferenceLoadMinFarOffset = 16 * KB;
 
 // Flags controlling the use of link-time generated thunks for Baker read barriers.
-constexpr bool kBakerReadBarrierLinkTimeThunksEnableForFields = true;
-constexpr bool kBakerReadBarrierLinkTimeThunksEnableForGcRoots = true;
+// Not yet implemented for heap poisoning.
+constexpr bool kBakerReadBarrierLinkTimeThunksEnableForFields = !kPoisonHeapReferences;
+constexpr bool kBakerReadBarrierLinkTimeThunksEnableForGcRoots = !kPoisonHeapReferences;
 
 // Some instructions have special requirements for a temporary, for example
 // LoadClass/kBssEntry and LoadString/kBssEntry for Baker read barrier require