ossrs / srs

SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
25.16k stars 5.31k forks source link

SRS_SANITIZER cannot be closed #3715

Closed terrencetang2023 closed 1 year ago

terrencetang2023 commented 1 year ago

Note: Please read FAQ before file an issue, see #2716

Description

I cross-compile srs on the host of ubuntu 20.04 and I want to close the SRS_SANITIZER via --sanitizer=off, but was forced to open after meeting the condition "$SRS_SANITIZER == NO && $OS_IS_CENTOS != YES", but I don't want to open it

  1. SRS Version: v6.0-d0

  2. SRS Log:

use clang tools
For cross build, host: /data/local/ohos-sdk/linux/native/llvm/bin/arm-linux-ohos-clang, prefix: /data/local/ohos-sdk/linux/native/llvm/bin/arm-linux-ohos-clang-, arch: arm, cpu:  gcc: /data/local/ohos-sdk/linux/native/llvm/bin/arm-linux-ohos-clang
Enable FFmpeg native opus for cross building
Enable asan by auto options.
User config: --prefix=/home/tangshaoteng/codes/gitee_priv/lycium_back/usr/srs/armeabi-v7a --cross-build --cc=/data/local/ohos-sdk/linux/native/llvm/bin/arm-linux-ohos-clang --cxx=/data/local/ohos-sdk/linux/native/llvm/bin/arm-linux-ohos-clang++ --ar=/data/local/ohos-sdk/linux/native/llvm/bin/llvm-ar --ld=/data/local/ohos-sdk/linux/native/llvm/bin/ld.lld --randlib=/data/local/ohos-sdk/linux/native/llvm/bin/llvm-ranlib --sanitizer=off --backtrace=off
Detail config: --prefix=/home/tangshaoteng/codes/gitee_priv/lycium_back/usr/srs/armeabi-v7a --config=conf/srs.conf --osx=off --hls=on --hds=off --dvr=on --ssl=on --https=on --ssl-1-0=off --ssl-local=off --sys-ssl=off --transcode=on --ingest=on --stat=on --http-callback=on --http-server=on --stream-converter=on --http-api=on --utest=off --srt=on --rtc=on --h265=off --gb28181=off --simulator=off --cxx11=on --cxx14=off --backtrace=off --ffmpeg-fit=on --ffmpeg-opus=on --nasm=on --srtp-nasm=on --clean=on --gperf=off --gmc=off --gmd=off --gmp=off --gcp=off --gprof=off --static=off --shared-st=off --shared-srt=off --shared-ffmpeg=off --log-verbose=off --log-info=off --log-trace=on --log-level_v2=on --gcov=off --apm=off --debug=off --debug-stats=off --cross-build=on --sanitizer=on --sanitizer-static=off --sanitizer-log=off --cygwin64=off --single-thread=off --generic-linux=off --arch=arm --host=/data/local/ohos-sdk/linux/native/llvm/bin/arm-linux-ohos-clang --cross-prefix=/data/local/ohos-sdk/linux/native/llvm/bin/arm-linux-ohos-clang- --cc=/data/local/ohos-sdk/linux/native/llvm/bin/arm-linux-ohos-clang --cxx=/data/local/ohos-sdk/linux/native/llvm/bin/arm-linux-ohos-clang++ --ar=/data/local/ohos-sdk/linux/native/llvm/bin/llvm-ar --ld=/data/local/ohos-sdk/linux/native/llvm/bin/ld.lld --randlib=/data/local/ohos-sdk/linux/native/llvm/bin/llvm-ranlib
Discover SRS version=6.0.59, major=6
SRS_WORKDIR: ., SRS_OBJS: ./objs, SRS_PLATFORM: Platform-SRS6-Linux-5.15.0-GCC9.4.0-x86_64-crossbuild-arm-linux
All outputs to: ./objs/Platform-SRS6-Linux-5.15.0-GCC9.4.0-x86_64-crossbuild-arm-linux
Alias python2 as python
SRS_JOBS: --jobs=8, SRS_DEPENDS_LIBS: /home/tangshaoteng/codes/gitee_priv/lycium_back/main/srs/srs-server-6.0-d0-armeabi-v7a-build/trunk/objs, OS_IS_LINUX: YES, OS_IS_UBUNTU: YES, SRS_CROSS_BUILD: YES, OS_IS_X86_64: YES
libasan api found ok!
Building state-threads.

Replay

I passed the parameter --sanitizer=off to configure, and the result was --sanitizer=on

Step 1: build

./configure --sanitizer=off

Expect

I pass the parameter --sanitizer=off to configure to close sanitizer

winlinvip commented 1 year ago

Fixed by https://github.com/ossrs/srs/commit/2777351c4b01a6c3122d76e95586a4e240e60382