mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
parent
3f7c4a7ff4
commit
6ad7787c14
4 changed files with 15 additions and 1 deletions
|
@ -96,6 +96,13 @@ srs_error_t do_main(int argc, char** argv, char** envp)
|
|||
// TODO: Might fail if change working directory.
|
||||
_srs_binary = argv[0];
|
||||
|
||||
// For sanitizer on macOS, to avoid the warning on startup.
|
||||
#if defined(SRS_OSX) && defined(SRS_SANITIZER)
|
||||
if (!getenv("MallocNanoZone")) {
|
||||
fprintf(stderr, "Asan: Please setup the env MallocNanoZone=0 to disable the warning, see https://stackoverflow.com/a/70209891/17679565\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
// Initialize global and thread-local variables.
|
||||
if ((err = srs_global_initialize()) != srs_success) {
|
||||
return srs_error_wrap(err, "global init");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue