summaryrefslogtreecommitdiff
path: root/trusty/coverage/coverage_test.cpp
diff options
context:
space:
mode:
authorHans Boehm <hboehm@google.com>2019-08-27 15:56:46 -0700
committerHans Boehm <hboehm@google.com>2019-11-26 15:32:40 -0800
commit5341172587847ab5abcc46f8950e9301b299a146 (patch)
treeb811d3f7b530b8b5e56de0e5d23839a19b85571d /trusty/coverage/coverage_test.cpp
parent300448a88c52c38947086418770e9db5f5e173c1 (diff)
Add check to sp<> raw pointer constructor
For the raw pointer constructor, check that the argument is not on the stack. Passing a stack pointer as an sp<> parameter is dangerous, since we will attempt to deallocate the object once the sp<> is no longer needed. We approximate ste stack ccheck by testing whether it is on the same page as the frame pointer. Do the same for raw pointer assignment. Bug: 138956784 Test: Boot AOSP Change-Id: I2c2405be443389af7e6a713aadcb3ee1f372a85e
Diffstat (limited to 'trusty/coverage/coverage_test.cpp')
0 files changed, 0 insertions, 0 deletions