1
0
Fork 0
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:
winlin 2022-12-04 22:39:28 +08:00
commit e6c395e473
7 changed files with 41 additions and 2 deletions

View file

@ -9,6 +9,6 @@
#define VERSION_MAJOR 5
#define VERSION_MINOR 0
#define VERSION_REVISION 103
#define VERSION_REVISION 105
#endif

View file

@ -24,6 +24,10 @@ using namespace std;
#include <gperftools/malloc_extension.h>
#endif
#ifdef SRS_SANITIZER_LOG
#include <sanitizer/asan_interface.h>
#endif
#include <unistd.h>
using namespace std;
@ -77,6 +81,13 @@ const char* _srs_binary = NULL;
// Free global data, for address sanitizer.
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.
*/
@ -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);
}
#endif
#ifdef SRS_SANITIZER_LOG
__asan_set_error_report_callback(asan_report_callback);
#endif
if ((err = run_directly_or_daemon()) != srs_success) {
return srs_error_wrap(err, "run");