diff options
| author | 2022-11-03 04:28:28 +0000 | |
|---|---|---|
| committer | 2022-11-29 00:30:46 +0000 | |
| commit | 52f7b14988e406564c3bf3b2a9c0ae42a3ccfbdb (patch) | |
| tree | 1ff862965776d745ed2eeabe48f6366daf966205 /libs | |
| parent | 6df92f08393a088cf174494d9db279ed2305aee0 (diff) | |
libbinder: Add __assert in Trusty
Delegate code calls the __assert macro which was
not defined on Trusty, causing the default implementation
based on syslog to be used. This provides a Trusty-specific
__assert implementation that uses Trusty logging APIs.
Bug: 230135749
Test: build.py on Trusty
Change-Id: Ic256a1a26a046cb697479e2328312972edbad4a6
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/binder/trusty/include/log/log.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/binder/trusty/include/log/log.h b/libs/binder/trusty/include/log/log.h index bf877a3179..d88d18a7be 100644 --- a/libs/binder/trusty/include/log/log.h +++ b/libs/binder/trusty/include/log/log.h @@ -120,3 +120,7 @@ static inline void __ignore_va_args__(...) {} do { \ TLOGE("android_errorWriteLog: tag:%x subTag:%s\n", tag, subTag); \ } while (0) + +extern "C" inline void __assert(const char* file, int line, const char* str) { + LOG_ALWAYS_FATAL("%s:%d: assertion \"%s\" failed", file, line, str); +} |