From 07996c16cf8622df5cc2465a8f8642e8dc89b305 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 9 Apr 2021 01:15:18 +0200 Subject: [PATCH] Fix gcc 8.3 with LTO. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In member function ‘UpdateSampleStatisticsImpl’: warning: argument 1 value ‘18446744073709551598’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] auto cfdata = (CallstackFrame*)alloca( ( fxsz-1 ) * sizeof( CallstackFrame ) ); ^ --- server/TracyWorker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 7cb74857..1cf9e59d 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -6519,7 +6519,7 @@ void Worker::UpdateSampleStatisticsImpl( const CallstackFrameData** frames, uint CallstackFrameId parentFrameId; if( fxsz != 1 ) { - auto cfdata = (CallstackFrame*)alloca( ( fxsz-1 ) * sizeof( CallstackFrame ) ); + auto cfdata = (CallstackFrame*)alloca( uint8_t( fxsz-1 ) * sizeof( CallstackFrame ) ); for( int i=0; idata[i+1];