commit | 7472ecb7c1ecacc39aea3769182be1941ce7d982 | [log] [tgz] |
---|---|---|
author | Hans Boehm <hboehm@google.com> | Tue Aug 27 15:56:46 2019 -0700 |
committer | Hans Boehm <hboehm@google.com> | Tue Nov 26 15:32:40 2019 -0800 |
tree | b811d3f7b530b8b5e56de0e5d23839a19b85571d | |
parent | fda74b766bb121e5c8f0e587ad11273a9347223f [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