commit | 5341172587847ab5abcc46f8950e9301b299a146 | [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 | 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