Skip to content

Fallback to valgrind?check=full when valgrind?check=new is unavailable. #4301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions trunk/src/app/srs_app_http_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,15 @@ srs_error_t SrsGoApiValgrind::cycle()
} else if (check == "changed") {
VALGRIND_DO_CHANGED_LEAK_CHECK;
} else if (check == "new") {
#if defined(VALGRIND_DO_NEW_LEAK_CHECK)
VALGRIND_DO_NEW_LEAK_CHECK;
#else
srs_warn("valgrind?check=new is not supported in current Valgrind version(%d.%d),"
"please upgrade to 3.22 or higher. "
"Fallback to valgrind?check=full",
__VALGRIND_MAJOR__, __VALGRIND_MINOR__);
VALGRIND_DO_LEAK_CHECK;
#endif
}

srs_usleep(3 * SRS_UTIME_SECONDS);
Expand Down