change asan leak

This commit is contained in:
yihaoDeng 2023-08-30 21:25:17 +08:00
parent 2ed576748a
commit 4b1e73860f
1 changed files with 11 additions and 3 deletions

View File

@ -30,13 +30,21 @@ fi
TAOS_DIR=`pwd`
LOG_DIR=$TAOS_DIR/sim/asan
error_num=`cat ${LOG_DIR}/*.asan | grep "ERROR" | wc -l`
archOs=`arch`
if [[ $archOs =~ "aarch64" ]];then
if [[ $archOs =~ "aarch64" ]]; then
echo "arm64 check mem leak"
memory_leak=`cat ${LOG_DIR}/*.asan | grep "Direct leak" | grep -v ""Direct leak of 32 byte"| wc -l`
memory_leak=`cat ${LOG_DIR}/*.asan | grep "Direct leak" | grep -v "Direct leak of 32 byte"| wc -l`
memory_count=`cat ${LOG_DIR}/*.asan | grep "Direct leak of 32 byte"| wc -l`
if [ $memory_count == $error_num ] && [ $memory_leak == 0 ]; then
echo "reset error_num to 0, ignore: __cxa_thread_atexit_impl leak"
error_num=0
fi
else
echo "os check mem leak"
memory_leak=`cat ${LOG_DIR}/*.asan | grep "Direct leak" | wc -l`
fi