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
Loading
Please register or sign in to comment