OSDN Git Service

Do allocation fence before pushing on allocation stack
authorMathieu Chartier <mathieuc@google.com>
Mon, 18 Jul 2016 18:11:45 +0000 (11:11 -0700)
committerMathieu Chartier <mathieuc@google.com>
Tue, 19 Jul 2016 21:09:24 +0000 (14:09 -0700)
commit2d857af288e020909a17dee1cb2b6e227a527d67
treec3a3f3848b5a47ecad4dec29c930547c20976bbb
parent80d337621edd360a93f3df4d695dcefd02390cc9
Do allocation fence before pushing on allocation stack

Heap::VisitObjects relies on having valid classes for objects in
the allocation stack. If the writes reorder, the thread calling
VisitObjects could see the free list pointer instead of the class
of the object. I believe this is causing crashes in VisitObjects.

Bug: 28790624

Test: Volantis booted

(cherry picked from commit 011dc2c4b9f3a064cba801679aedd3251fe191e3)

Change-Id: Ib620acbcd641ccd59fea9a66f5587c5026110a22
runtime/arch/arm/quick_entrypoints_arm.S
runtime/arch/arm64/quick_entrypoints_arm64.S