WebRTC RTC publish streams use timer callbacks (`SrsRtcPublishRtcpTimer` and `SrsRtcPublishTwccTimer`) that can cause race conditions in SRS's coroutine-based architecture. The timer callbacks are heavy functions that may trigger coroutine switches, during which the timer object can be freed by another coroutine, leading to use-after-free crashes. The race condition occurs because: 1. Timer callbacks (`on_timer`) perform heavy operations that can yield control 2. During coroutine switches, other coroutines may destroy the timer object 3. When control returns, the callback continues executing on a freed object Fixes potential crashes in WebRTC RTC publish streams under high concurrency. |
||
|---|---|---|
| .. | ||
| 3rdparty | ||
| auto | ||
| conf | ||
| doc | ||
| etc/init.d | ||
| gdb | ||
| ide/srs_clion | ||
| packaging/redhat | ||
| research | ||
| scripts | ||
| src | ||
| usr/lib/systemd/system | ||
| .gitignore | ||
| AUTHORS.md | ||
| AUTHORS.txt | ||
| configure | ||
| Dockerfile.builds | ||
| Dockerfile.cov | ||
| Dockerfile.pkg | ||
| Dockerfile.test | ||