From: khizmax Date: Sun, 5 Mar 2017 08:21:22 +0000 (+0300) Subject: [UBsan] Fixed int overflow X-Git-Tag: v2.3.0~143 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=libcds.git;a=commitdiff_plain;h=a05d2b9775db0175d96177eb9313a494a26cf572 [UBsan] Fixed int overflow --- diff --git a/projects/Win/vc14/cds.sln b/projects/Win/vc14/cds.sln index 47343389..86725534 100644 --- a/projects/Win/vc14/cds.sln +++ b/projects/Win/vc14/cds.sln @@ -18,6 +18,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cds_test", "cds_test", "{3A ProjectSection(SolutionItems) = preProject ..\..\..\test\include\cds_test\check_size.h = ..\..\..\test\include\cds_test\check_size.h ..\..\..\test\include\cds_test\city.h = ..\..\..\test\include\cds_test\city.h + ..\..\..\test\include\cds_test\fc_hevy_value.h = ..\..\..\test\include\cds_test\fc_hevy_value.h ..\..\..\test\include\cds_test\fixture.h = ..\..\..\test\include\cds_test\fixture.h ..\..\..\test\include\cds_test\hash_func.h = ..\..\..\test\include\cds_test\hash_func.h ..\..\..\test\include\cds_test\stat_bronson_avltree_out.h = ..\..\..\test\include\cds_test\stat_bronson_avltree_out.h diff --git a/test/include/cds_test/fc_hevy_value.h b/test/include/cds_test/fc_hevy_value.h index 9208a116..b17fd2a1 100644 --- a/test/include/cds_test/fc_hevy_value.h +++ b/test/include/cds_test/fc_hevy_value.h @@ -54,7 +54,7 @@ namespace fc_test { , nWriterNo(other.nWriterNo) { for(size_t i = 0; i < buffer_size; ++i) - pop_buff[i] = static_cast(std::sqrt(other.pop_buff[i]*rand())); + pop_buff[i] = static_cast(std::sqrt( static_cast( pop_buff[i] * rand()))); } void set_array(size_t new_size)