diff options
author | Hans Boehm <hboehm@google.com> | 2018-04-27 16:35:18 -0700 |
---|---|---|
committer | Hans Boehm <hboehm@google.com> | 2018-08-03 17:56:47 -0700 |
commit | 9d3146af22588e0c23e110be13a515f5347bf687 (patch) | |
tree | 0b5e7764beebbcfdc8ff23551da515361612e35a /libbacktrace/include | |
parent | f6b823141eb5dcb0cdc387ee376a7414d27c3819 (diff) | |
download | system_core-9d3146af22588e0c23e110be13a515f5347bf687.tar.gz system_core-9d3146af22588e0c23e110be13a515f5347bf687.tar.bz2 system_core-9d3146af22588e0c23e110be13a515f5347bf687.zip |
Prepare to fail in RefBase destructor if count is untouched
Move towards crashing if a normally configured RefBase object is
destroyed without ever incrementing the reference count. We've been
threatening to do this for a long time. The previously last known
violation had been fixed.
This also fixes stack trace printing from RefBase, which had previously
been broken, and which we found necessary to track down further
violations of this rule.
Unfortunately, we found several more violations with the aid of
that fix. After existing CLs are submitted, there are
still some failures, but they are no longer numerous. Thus this CL
doesn't actually crash in the event of a violation, but does log a
verbose stack trace if it encounters one.
Bugs have been filed against the remaining known RefBase client offenders.
We plan to enable crashing on usage violations once those are fixed.
The fix for the stack trace printing breakage unfortunately requires
the use of weak symbols in order to avoid a circular build dependency.
We expect to eventually replace this with execinfo.h functionality.
Some random reformatting, driven by consistency with current formatting
requirements.
Add missing include to BacktraceMap.h.
Bug: 79112958
Bug: 30292291
Test: Boot AOSP, Master
Change-Id: I8151c54560c3b6f75ffc4c48229f0388a2066958
Diffstat (limited to 'libbacktrace/include')
-rw-r--r-- | libbacktrace/include/backtrace/BacktraceMap.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libbacktrace/include/backtrace/BacktraceMap.h b/libbacktrace/include/backtrace/BacktraceMap.h index a9cfce4cb..c564271b6 100644 --- a/libbacktrace/include/backtrace/BacktraceMap.h +++ b/libbacktrace/include/backtrace/BacktraceMap.h @@ -31,6 +31,7 @@ #include <deque> #include <iterator> +#include <memory> #include <string> #include <vector> |