From 2240fd3b0cb112729c63293e1d0c2fdc6fbd76a2 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 16 Jun 2022 14:07:51 +0200 Subject: [PATCH] Remove invalid assert. The original intention was to ensure that either a ring buffer with data was selected (sel >= 0 ), or there is no data left to process (activeNum == 0). However, in an unlikely case that all ring buffers contain a PERF_RECORD_LOST event, it is possible for the assert to fail, as there may still be data in buffers, but at the same time no buffer would be selected. Buffer processing advances the data pointers, so in the next loop iteration the results may be different. --- client/TracySysTrace.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/client/TracySysTrace.cpp b/client/TracySysTrace.cpp index 91a6ad36..260fcc40 100644 --- a/client/TracySysTrace.cpp +++ b/client/TracySysTrace.cpp @@ -1324,7 +1324,6 @@ void SysTraceWorker( void* ptr ) } } } - assert( sel >= 0 || activeNum == 0 ); if( sel >= 0 ) { auto& ring = s_ring[s_ctxBufferIdx + sel];