mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Merge branch v5.0.105 into develop.
* v5.0, 2022-12-04, Cygwin: Enable gb28181 for Windows. v5.0.105 * v5.0, 2022-12-04, Asan: Set asan loging callback. v5.0.104
This commit is contained in:
commit
e6c395e473
7 changed files with 41 additions and 2 deletions
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -56,7 +56,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
WORKDIR=$(cygpath -u $SRS_WORKSPACE) && export PATH=/usr/bin:/usr/local/bin && cd ${WORKDIR} &&
|
WORKDIR=$(cygpath -u $SRS_WORKSPACE) && export PATH=/usr/bin:/usr/local/bin && cd ${WORKDIR} &&
|
||||||
pwd && ls -lh && rm -rf trunk/objs && tar xf objs.tar.bz2 -C trunk/ && du -sh trunk/* &&
|
pwd && ls -lh && rm -rf trunk/objs && tar xf objs.tar.bz2 -C trunk/ && du -sh trunk/* &&
|
||||||
cd ${WORKDIR}/trunk && ./configure --utest=on && make utest && ./objs/srs_utest
|
cd ${WORKDIR}/trunk && ./configure --gb28181=on --utest=on && make utest && ./objs/srs_utest
|
||||||
outputs:
|
outputs:
|
||||||
SRS_CYGWIN_DONE: ok
|
SRS_CYGWIN_DONE: ok
|
||||||
|
|
||||||
|
|
|
@ -155,6 +155,11 @@ if [[ $SRS_GPERF_CP == YES ]]; then
|
||||||
else
|
else
|
||||||
srs_undefine_macro "SRS_GPERF_CP" $SRS_AUTO_HEADERS_H
|
srs_undefine_macro "SRS_GPERF_CP" $SRS_AUTO_HEADERS_H
|
||||||
fi
|
fi
|
||||||
|
if [ $SRS_SANITIZER_LOG == YES ]; then
|
||||||
|
srs_define_macro "SRS_SANITIZER_LOG" $SRS_AUTO_HEADERS_H
|
||||||
|
else
|
||||||
|
srs_undefine_macro "SRS_SANITIZER_LOG" $SRS_AUTO_HEADERS_H
|
||||||
|
fi
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
# for embeded.
|
# for embeded.
|
||||||
|
|
|
@ -347,6 +347,18 @@ if [[ $SRS_SANITIZER == YES && $OS_IS_X86_64 == YES ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $SRS_SANITIZER == YES && $OS_IS_X86_64 == YES ]]; then
|
||||||
|
echo "#include <sanitizer/asan_interface.h>" > ${SRS_OBJS}/test_sanitizer.c &&
|
||||||
|
echo "int main() { return 0; }" >> ${SRS_OBJS}/test_sanitizer.c &&
|
||||||
|
gcc -fsanitize=address -fno-omit-frame-pointer -g -O0 ${SRS_OBJS}/test_sanitizer.c \
|
||||||
|
-o ${SRS_OBJS}/test_sanitizer 1>/dev/null 2>&1;
|
||||||
|
ret=$?; rm -rf ${SRS_OBJS}/test_sanitizer*
|
||||||
|
if [[ $ret -eq 0 ]]; then
|
||||||
|
echo "libasan api found ok!";
|
||||||
|
SRS_SANITIZER_LOG=YES
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
# state-threads
|
# state-threads
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
|
|
|
@ -69,6 +69,7 @@ SRS_USE_SYS_SSL=NO # Use system ssl(-lssl) if required.
|
||||||
SRS_VALGRIND=NO
|
SRS_VALGRIND=NO
|
||||||
SRS_SANITIZER=YES
|
SRS_SANITIZER=YES
|
||||||
SRS_SANITIZER_STATIC=NO
|
SRS_SANITIZER_STATIC=NO
|
||||||
|
SRS_SANITIZER_LOG=NO
|
||||||
SRS_BUILD_TAG= # Set the object files tag name.
|
SRS_BUILD_TAG= # Set the object files tag name.
|
||||||
SRS_CLEAN=YES # Whether do "make clean" when configure.
|
SRS_CLEAN=YES # Whether do "make clean" when configure.
|
||||||
SRS_SIMULATOR=NO # Whether enable RTC simulate API.
|
SRS_SIMULATOR=NO # Whether enable RTC simulate API.
|
||||||
|
@ -163,6 +164,7 @@ Performance: @see https://blog.csdn.net/win_lin/article/details/5
|
||||||
--gprof=on|off Whether build SRS with gprof(GNU profile tool). Default: $(value2switch $SRS_GPROF)
|
--gprof=on|off Whether build SRS with gprof(GNU profile tool). Default: $(value2switch $SRS_GPROF)
|
||||||
--sanitizer=on|off Whether build SRS with address sanitizer. Default: $(value2switch $SRS_SANITIZER)
|
--sanitizer=on|off Whether build SRS with address sanitizer. Default: $(value2switch $SRS_SANITIZER)
|
||||||
--sanitizer-static=on|off Whether build SRS with static libasan. Default: $(value2switch $SRS_SANITIZER_STATIC)
|
--sanitizer-static=on|off Whether build SRS with static libasan. Default: $(value2switch $SRS_SANITIZER_STATIC)
|
||||||
|
--sanitizer-log=on|off Whether hijack the log for libasan. Default: $(value2switch $SRS_SANITIZER_LOG)
|
||||||
|
|
||||||
--nasm=on|off Whether build FFMPEG for RTC with nasm. Default: $(value2switch $SRS_NASM)
|
--nasm=on|off Whether build FFMPEG for RTC with nasm. Default: $(value2switch $SRS_NASM)
|
||||||
--srtp-nasm=on|off Whether build SRTP with ASM(openssl-asm), requires RTC and openssl-1.0.*. Default: $(value2switch $SRS_SRTP_ASM)
|
--srtp-nasm=on|off Whether build SRTP with ASM(openssl-asm), requires RTC and openssl-1.0.*. Default: $(value2switch $SRS_SRTP_ASM)
|
||||||
|
@ -348,6 +350,7 @@ function parse_user_option() {
|
||||||
|
|
||||||
--sanitizer) SRS_SANITIZER=$(switch2value $value) ;;
|
--sanitizer) SRS_SANITIZER=$(switch2value $value) ;;
|
||||||
--sanitizer-static) SRS_SANITIZER_STATIC=$(switch2value $value) ;;
|
--sanitizer-static) SRS_SANITIZER_STATIC=$(switch2value $value) ;;
|
||||||
|
--sanitizer-log) SRS_SANITIZER_LOG=$(switch2value $value) ;;
|
||||||
|
|
||||||
--use-sys-ssl) SRS_USE_SYS_SSL=YES ;;
|
--use-sys-ssl) SRS_USE_SYS_SSL=YES ;;
|
||||||
--sys-ssl) SRS_USE_SYS_SSL=$(switch2value $value) ;;
|
--sys-ssl) SRS_USE_SYS_SSL=$(switch2value $value) ;;
|
||||||
|
@ -624,6 +627,8 @@ function regenerate_options() {
|
||||||
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --debug-stats=$(value2switch $SRS_DEBUG_STATS)"
|
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --debug-stats=$(value2switch $SRS_DEBUG_STATS)"
|
||||||
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --cross-build=$(value2switch $SRS_CROSS_BUILD)"
|
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --cross-build=$(value2switch $SRS_CROSS_BUILD)"
|
||||||
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --sanitizer=$(value2switch $SRS_SANITIZER)"
|
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --sanitizer=$(value2switch $SRS_SANITIZER)"
|
||||||
|
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --sanitizer-static=$(value2switch $SRS_SANITIZER_STATIC)"
|
||||||
|
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --sanitizer-log=$(value2switch $SRS_SANITIZER_LOG)"
|
||||||
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --cygwin64=$(value2switch $SRS_CYGWIN64)"
|
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --cygwin64=$(value2switch $SRS_CYGWIN64)"
|
||||||
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --single-thread=$(value2switch $SRS_SINGLE_THREAD)"
|
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --single-thread=$(value2switch $SRS_SINGLE_THREAD)"
|
||||||
if [[ $SRS_CROSS_BUILD_ARCH != "" ]]; then SRS_AUTO_CONFIGURE="$SRS_AUTO_CONFIGURE --arch=$SRS_CROSS_BUILD_ARCH"; fi
|
if [[ $SRS_CROSS_BUILD_ARCH != "" ]]; then SRS_AUTO_CONFIGURE="$SRS_AUTO_CONFIGURE --arch=$SRS_CROSS_BUILD_ARCH"; fi
|
||||||
|
|
|
@ -18,6 +18,8 @@ The changelog for SRS.
|
||||||
|
|
||||||
## SRS 5.0 Changelog
|
## SRS 5.0 Changelog
|
||||||
|
|
||||||
|
* v5.0, 2022-12-04, Cygwin: Enable gb28181 for Windows. v5.0.105
|
||||||
|
* v5.0, 2022-12-04, Asan: Set asan loging callback. v5.0.104
|
||||||
* v5.0, 2022-12-02, GB28181: Enable GB for CentOS 7 package. v5.0.103
|
* v5.0, 2022-12-02, GB28181: Enable GB for CentOS 7 package. v5.0.103
|
||||||
* v5.0, 2022-12-02, Package script support extra options. v5.0.102
|
* v5.0, 2022-12-02, Package script support extra options. v5.0.102
|
||||||
* v5.0, 2022-12-02, Disable CLS and APM by default. v5.0.101
|
* v5.0, 2022-12-02, Disable CLS and APM by default. v5.0.101
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
|
|
||||||
#define VERSION_MAJOR 5
|
#define VERSION_MAJOR 5
|
||||||
#define VERSION_MINOR 0
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_REVISION 103
|
#define VERSION_REVISION 105
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,6 +24,10 @@ using namespace std;
|
||||||
#include <gperftools/malloc_extension.h>
|
#include <gperftools/malloc_extension.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SRS_SANITIZER_LOG
|
||||||
|
#include <sanitizer/asan_interface.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -77,6 +81,13 @@ const char* _srs_binary = NULL;
|
||||||
// Free global data, for address sanitizer.
|
// Free global data, for address sanitizer.
|
||||||
extern void srs_free_global_system_ips();
|
extern void srs_free_global_system_ips();
|
||||||
|
|
||||||
|
#ifdef SRS_SANITIZER_LOG
|
||||||
|
void asan_report_callback(const char* str)
|
||||||
|
{
|
||||||
|
srs_trace("%s", str);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* main entrance.
|
* main entrance.
|
||||||
*/
|
*/
|
||||||
|
@ -221,6 +232,10 @@ srs_error_t do_main(int argc, char** argv, char** envp)
|
||||||
srs_trace("tcmalloc: set release-rate %.2f=>%.2f", otrr, trr);
|
srs_trace("tcmalloc: set release-rate %.2f=>%.2f", otrr, trr);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SRS_SANITIZER_LOG
|
||||||
|
__asan_set_error_report_callback(asan_report_callback);
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((err = run_directly_or_daemon()) != srs_success) {
|
if ((err = run_directly_or_daemon()) != srs_success) {
|
||||||
return srs_error_wrap(err, "run");
|
return srs_error_wrap(err, "run");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue