RefBase: test for stack check
Surprised this isn't breaking anything, so wanted to
make sure it worked.
Bug: 232557259
Test: libutils_test
Change-Id: Iaec47d644c02dc190e397c6f84dcfab4cc76f566
diff --git a/libutils/RefBase.cpp b/libutils/RefBase.cpp
index 5199ef6..3a11547 100644
--- a/libutils/RefBase.cpp
+++ b/libutils/RefBase.cpp
@@ -149,8 +149,8 @@
// Same for weak counts.
#define BAD_WEAK(c) ((c) == 0 || ((c) & (~MAX_COUNT)) != 0)
-// see utils/StrongPointer.h - declared there for legacy reasons
-void sp_report_stack_pointer();
+// name kept because prebuilts used to use it from inlining sp<> code
+void sp_report_stack_pointer() { LOG_ALWAYS_FATAL("RefBase used with stack pointer argument"); }
// Check whether address is definitely on the calling stack. We actually check whether it is on
// the same 4K page as the frame pointer.