diff options
author | Hans Boehm <hboehm@google.com> | 2019-08-27 15:56:46 -0700 |
---|---|---|
committer | Hans Boehm <hboehm@google.com> | 2019-11-26 15:32:40 -0800 |
commit | 5341172587847ab5abcc46f8950e9301b299a146 (patch) | |
tree | b811d3f7b530b8b5e56de0e5d23839a19b85571d /trusty/coverage/coverage.cpp | |
parent | 300448a88c52c38947086418770e9db5f5e173c1 (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.cpp')
0 files changed, 0 insertions, 0 deletions