projects
/
libcds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
605038e
)
[UBsan] Fixed signed integer overflow
author
khizmax
<khizmax@gmail.com>
Tue, 7 Mar 2017 07:54:20 +0000
(10:54 +0300)
committer
khizmax
<khizmax@gmail.com>
Tue, 7 Mar 2017 07:54:20 +0000
(10:54 +0300)
test/include/cds_test/fc_hevy_value.h
patch
|
blob
|
history
diff --git
a/test/include/cds_test/fc_hevy_value.h
b/test/include/cds_test/fc_hevy_value.h
index
b17fd2a
..
4159bd7
100644
(file)
--- a/
test/include/cds_test/fc_hevy_value.h
+++ b/
test/include/cds_test/fc_hevy_value.h
@@
-53,8
+53,9
@@
namespace fc_test {
, nNo(other.nNo)
, nWriterNo(other.nWriterNo)
{
, nNo(other.nNo)
, nWriterNo(other.nWriterNo)
{
+ // This is an imitation of heavy copy ctor
for(size_t i = 0; i < buffer_size; ++i)
for(size_t i = 0; i < buffer_size; ++i)
- pop_buff[i] =
static_cast<int>(std::sqrt( static_cast<int>( pop_buff[i]
* rand())));
+ pop_buff[i] =
static_cast<int>( std::sqrt( std::abs( static_cast<double>( pop_buff[i] )
* rand())));
}
void set_array(size_t new_size)
}
void set_array(size_t new_size)