P4 to Git Change 1261645 by smekhano@stas-nova-hsa on 2016/04/25 18:33:13
SWDEV-92625 - x86 RT: fix division by zero in cpumapping::HCtoDCmap In many cases default alignment passed as 0. At the same time minimal possible alignment is 1, while cpumappings uses this value as a divisor. Set it to max(passed alignment, 1). Testing: smoke, precheckin, conformance really quick on cpu Reviewed by German Andreev Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpumapping.cpp#5 edit
Cette révision appartient à :
@@ -27,6 +27,7 @@ using std::max;
|
||||
namespace cpu {
|
||||
HCtoDCmap::HCtoDCmap(const clk_parameter_descriptor_t* desc, unsigned int level_alignment, unsigned int index, unsigned int init_offset)
|
||||
{
|
||||
level_alignment = std::max(level_alignment, 1u); // Minimal possible alignment is 1 and alignment is used as a divisor below.
|
||||
//Initialize fields
|
||||
hc_offset = 0;
|
||||
hc_size = 0;
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur