openharmony 鸿蒙 hiappevent-watcher-address-sanitizer-events

2025-06-12 浏览 (1)

Address Sanitizer Event Overview

HiAppEvent provides APIs for subscribing to address sanitizer events of the system.

The params parameter in the event information is described as follows:

params:

NameTypeDescription
timenumberEvent triggering time, in ms.
bundle_versionstringApplication version.
bundle_namestringApplication name.
pidnumberProcess ID of the application.
uidnumberUser ID of the application.
typestringType of the address sanitizer error. For details, see the description of type.
external_logstring[]Path of the error log file. If the directory files exceed the threshold (for details, see log_over_limit), new log files may fail to be written. Therefore, delete the log files immediately after they are processed.
log_over_limitbooleanWhether the size of generated fault log files and existing log files exceeds the upper limit (5 MB). The value true indicates that the upper limit is exceeded and logs fail to be written. The value false indicates that the upper limit is not exceeded.

type:

ValueDescription
alloc-dealloc-mismatchThe memory allocation and release modes do not match.
allocation-size-too-bigThe memory allocated is too large for the heap.
calloc-overflowcalloc() fails.
container-overflowThe container overflows.
double-freeThe same memory address is released more than once.
dynamic-stack-buffer-overflowThe buffer access exceeds the boundary of a stack-allocated object.
global-buffer-overflowThe global buffer overflows.
heap-buffer-overflowThe heap buffer overflows.
heap-use-after-freeThe released heap memory is used.
invalid-allocation-alignmentThe alignment mode specified in memory allocation is invalid.
memcpy-param-overlapmemcpy() does not support overlapping memory regions.
new-delete-type-mismatchThe released memory size does not match the allocated memory size.
stack-buffer-overflowThe stack buffer overflows.
stack-buffer-underflowThe stack buffer underflows.
stack-use-after-returnThe stack memory is used after the function has returned.
stack-use-after-scopeThe stack memory is out of range.
strcat-param-overlapThe source and destination buffers used for string concatenation overlap.
use-after-poisonThe poisoned memory (memory marked as invalid or inaccessible) is accessed or modified.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Performance Analysis Kit

harmony 鸿蒙Analyzing Application Freeze

harmony 鸿蒙Development of Application Recovery

harmony 鸿蒙Analyzing C++ Crash

harmony 鸿蒙Development of Error Manager

harmony 鸿蒙hdc

harmony 鸿蒙Event Reporting

harmony 鸿蒙Introduction to HiAppEvent

harmony 鸿蒙Subscribing to Address Sanitizer Events (ArkTS)

harmony 鸿蒙Subscribing to Address Sanitizer Events (C/C++)

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/IAuGH6