1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-28 20:23:51 +00:00

Fix gcc 8.3 with LTO.

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 ) );
                                        ^
This commit is contained in:
Bartosz Taudul 2021-04-09 01:15:18 +02:00
parent 69300ef6ec
commit 07996c16cf
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -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; i<fxsz-1; i++ )
{
cfdata[i] = fexcl->data[i+1];