New Defects reported by Coverity Scan for digiKam
scan-admin at coverity.com
scan-admin at coverity.com
Fri Feb 10 08:35:26 GMT 2017
Hi,
Please find the latest report on new defect(s) introduced to digiKam found with Coverity Scan.
8 new defect(s) introduced to digiKam found with Coverity Scan.
5 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 8 of 8 defect(s)
** CID 1400438: Null pointer dereferences (FORWARD_NULL)
/home/gilles/Devel/5.x/core/utilities/fuzzysearch/findduplicatesalbum.cpp: 114 in Digikam::FindDuplicatesAlbum::updateDuplicatesAlbumItems(const QList<Digikam::SAlbum *> &, QList<long long>&)()
________________________________________________________________________________________________________
*** CID 1400438: Null pointer dereferences (FORWARD_NULL)
/home/gilles/Devel/5.x/core/utilities/fuzzysearch/findduplicatesalbum.cpp: 114 in Digikam::FindDuplicatesAlbum::updateDuplicatesAlbumItems(const QList<Digikam::SAlbum *> &, QList<long long>&)()
108 void FindDuplicatesAlbum::updateDuplicatesAlbumItems(const QList<SAlbum*>& sAlbumsToRebuild, const QList<qlonglong>& deletedImages)
109 {
110 QTreeWidgetItemIterator it(this);
111
112 while (*it)
113 {
>>> CID 1400438: Null pointer dereferences (FORWARD_NULL)
>>> Assigning: "item" = "dynamic_cast <Digikam::FindDuplicatesAlbumItem *>(*it)".
114 FindDuplicatesAlbumItem* const item = dynamic_cast<FindDuplicatesAlbumItem*>(*it);
115
116 if (sAlbumsToRebuild.contains(item->album()))
117 {
118 item->calculateInfos(deletedImages);
119 //item->setHidden(item->itemCount() < 2);
** CID 1352650: (BAD_ALLOC_ARITHMETIC)
/usr/include/Eigen/src/Core/SolveTriangular.h: 65 in Eigen::internal::triangular_solver_selector<const Eigen::Matrix<double, (int)-1, (int)-1, (int)0, (int)-1, (int)-1>, Eigen::Matrix<double, (int)-1, (int)1, (int)0, (int)-1, (int)1>, (int)1, (int)5, (int)0, (int)1>::run(const Eigen::Matrix<double, (int)-1, (int)-1, (int)0, (int)-1, (int)-1> &, Eigen::Matrix<double, (int)-1, (int)1, (int)0, (int)-1, (int)1> &)()
/usr/include/Eigen/src/Core/SolveTriangular.h: 65 in Eigen::internal::triangular_solver_selector<const Eigen::Matrix<double, (int)-1, (int)-1, (int)0, (int)-1, (int)-1>, Eigen::Matrix<double, (int)-1, (int)1, (int)0, (int)-1, (int)1>, (int)1, (int)2, (int)0, (int)1>::run(const Eigen::Matrix<double, (int)-1, (int)-1, (int)0, (int)-1, (int)-1> &, Eigen::Matrix<double, (int)-1, (int)1, (int)0, (int)-1, (int)1> &)()
________________________________________________________________________________________________________
*** CID 1352650: (BAD_ALLOC_ARITHMETIC)
/usr/include/Eigen/src/Core/SolveTriangular.h: 65 in Eigen::internal::triangular_solver_selector<const Eigen::Matrix<double, (int)-1, (int)-1, (int)0, (int)-1, (int)-1>, Eigen::Matrix<double, (int)-1, (int)1, (int)0, (int)-1, (int)1>, (int)1, (int)5, (int)0, (int)1>::run(const Eigen::Matrix<double, (int)-1, (int)-1, (int)0, (int)-1, (int)-1> &, Eigen::Matrix<double, (int)-1, (int)1, (int)0, (int)-1, (int)1> &)()
59 ActualLhsType actualLhs = LhsProductTraits::extract(lhs);
60
61 // FIXME find a way to allow an inner stride if packet_traits<Scalar>::size==1
62
63 bool useRhsDirectly = Rhs::InnerStrideAtCompileTime==1 || rhs.innerStride()==1;
64
>>> CID 1352650: (BAD_ALLOC_ARITHMETIC)
>>> Adding an offset to the result of a call to "__builtin_alloca" might indicate an under-allocation.
65 ei_declare_aligned_stack_constructed_variable(RhsScalar,actualRhs,rhs.size(),
66 (useRhsDirectly ? rhs.data() : 0));
67
68 if(!useRhsDirectly)
69 MappedRhs(actualRhs,rhs.size()) = rhs;
70
/usr/include/Eigen/src/Core/SolveTriangular.h: 65 in Eigen::internal::triangular_solver_selector<const Eigen::Matrix<double, (int)-1, (int)-1, (int)0, (int)-1, (int)-1>, Eigen::Matrix<double, (int)-1, (int)1, (int)0, (int)-1, (int)1>, (int)1, (int)2, (int)0, (int)1>::run(const Eigen::Matrix<double, (int)-1, (int)-1, (int)0, (int)-1, (int)-1> &, Eigen::Matrix<double, (int)-1, (int)1, (int)0, (int)-1, (int)1> &)()
59 ActualLhsType actualLhs = LhsProductTraits::extract(lhs);
60
61 // FIXME find a way to allow an inner stride if packet_traits<Scalar>::size==1
62
63 bool useRhsDirectly = Rhs::InnerStrideAtCompileTime==1 || rhs.innerStride()==1;
64
>>> CID 1352650: (BAD_ALLOC_ARITHMETIC)
>>> Adding an offset to the result of a call to "__builtin_alloca" might indicate an under-allocation.
65 ei_declare_aligned_stack_constructed_variable(RhsScalar,actualRhs,rhs.size(),
66 (useRhsDirectly ? rhs.data() : 0));
67
68 if(!useRhsDirectly)
69 MappedRhs(actualRhs,rhs.size()) = rhs;
70
** CID 1341901: (BAD_ALLOC_ARITHMETIC)
/usr/include/Eigen/src/Core/products/GeneralMatrixMatrix.h: 162 in Eigen::internal::general_matrix_matrix_product<long, double, (int)0, (bool)0, double, (int)0, (bool)0, (int)0>::run(long, long, long, const double *, long, const double *, long, double *, long, double, Eigen::internal::level3_blocking<double, double> &, Eigen::internal::GemmParallelInfo<long> *)()
/usr/include/Eigen/src/Core/products/GeneralMatrixMatrix.h: 163 in Eigen::internal::general_matrix_matrix_product<long, double, (int)0, (bool)0, double, (int)0, (bool)0, (int)0>::run(long, long, long, const double *, long, const double *, long, double *, long, double, Eigen::internal::level3_blocking<double, double> &, Eigen::internal::GemmParallelInfo<long> *)()
________________________________________________________________________________________________________
*** CID 1341901: (BAD_ALLOC_ARITHMETIC)
/usr/include/Eigen/src/Core/products/GeneralMatrixMatrix.h: 162 in Eigen::internal::general_matrix_matrix_product<long, double, (int)0, (bool)0, double, (int)0, (bool)0, (int)0>::run(long, long, long, const double *, long, const double *, long, double *, long, double, Eigen::internal::level3_blocking<double, double> &, Eigen::internal::GemmParallelInfo<long> *)()
156 EIGEN_UNUSED_VARIABLE(info);
157
158 // this is the sequential version!
159 std::size_t sizeA = kc*mc;
160 std::size_t sizeB = kc*nc;
161
>>> CID 1341901: (BAD_ALLOC_ARITHMETIC)
>>> Adding an offset to the result of a call to "__builtin_alloca" might indicate an under-allocation.
162 ei_declare_aligned_stack_constructed_variable(LhsScalar, blockA, sizeA, blocking.blockA());
163 ei_declare_aligned_stack_constructed_variable(RhsScalar, blockB, sizeB, blocking.blockB());
164
165 const bool pack_rhs_once = mc!=rows && kc==depth && nc==cols;
166
167 // For each horizontal panel of the rhs, and corresponding panel of the lhs...
/usr/include/Eigen/src/Core/products/GeneralMatrixMatrix.h: 163 in Eigen::internal::general_matrix_matrix_product<long, double, (int)0, (bool)0, double, (int)0, (bool)0, (int)0>::run(long, long, long, const double *, long, const double *, long, double *, long, double, Eigen::internal::level3_blocking<double, double> &, Eigen::internal::GemmParallelInfo<long> *)()
157
158 // this is the sequential version!
159 std::size_t sizeA = kc*mc;
160 std::size_t sizeB = kc*nc;
161
162 ei_declare_aligned_stack_constructed_variable(LhsScalar, blockA, sizeA, blocking.blockA());
>>> CID 1341901: (BAD_ALLOC_ARITHMETIC)
>>> Adding an offset to the result of a call to "__builtin_alloca" might indicate an under-allocation.
163 ei_declare_aligned_stack_constructed_variable(RhsScalar, blockB, sizeB, blocking.blockB());
164
165 const bool pack_rhs_once = mc!=rows && kc==depth && nc==cols;
166
167 // For each horizontal panel of the rhs, and corresponding panel of the lhs...
168 for(Index i2=0; i2<rows; i2+=mc)
** CID 1341900: (BAD_ALLOC_ARITHMETIC)
/usr/include/Eigen/src/Core/products/TriangularSolverMatrix.h: 74 in Eigen::internal::triangular_solve_matrix<double, long, (int)1, (int)5, (bool)0, (int)0, (int)0>::run(long, long, const double *, long, double *, long, Eigen::internal::level3_blocking<double, double> &)()
/usr/include/Eigen/src/Core/products/TriangularSolverMatrix.h: 75 in Eigen::internal::triangular_solve_matrix<double, long, (int)1, (int)5, (bool)0, (int)0, (int)0>::run(long, long, const double *, long, double *, long, Eigen::internal::level3_blocking<double, double> &)()
________________________________________________________________________________________________________
*** CID 1341900: (BAD_ALLOC_ARITHMETIC)
/usr/include/Eigen/src/Core/products/TriangularSolverMatrix.h: 74 in Eigen::internal::triangular_solve_matrix<double, long, (int)1, (int)5, (bool)0, (int)0, (int)0>::run(long, long, const double *, long, double *, long, Eigen::internal::level3_blocking<double, double> &)()
68 Index kc = blocking.kc(); // cache block size along the K direction
69 Index mc = (std::min)(size,blocking.mc()); // cache block size along the M direction
70
71 std::size_t sizeA = kc*mc;
72 std::size_t sizeB = kc*cols;
73
>>> CID 1341900: (BAD_ALLOC_ARITHMETIC)
>>> Adding an offset to the result of a call to "__builtin_alloca" might indicate an under-allocation.
74 ei_declare_aligned_stack_constructed_variable(Scalar, blockA, sizeA, blocking.blockA());
75 ei_declare_aligned_stack_constructed_variable(Scalar, blockB, sizeB, blocking.blockB());
76
77 conj_if<Conjugate> conj;
78 gebp_kernel<Scalar, Scalar, Index, OtherMapper, Traits::mr, Traits::nr, Conjugate, false> gebp_kernel;
79 gemm_pack_lhs<Scalar, Index, TriMapper, Traits::mr, Traits::LhsProgress, TriStorageOrder> pack_lhs;
/usr/include/Eigen/src/Core/products/TriangularSolverMatrix.h: 75 in Eigen::internal::triangular_solve_matrix<double, long, (int)1, (int)5, (bool)0, (int)0, (int)0>::run(long, long, const double *, long, double *, long, Eigen::internal::level3_blocking<double, double> &)()
69 Index mc = (std::min)(size,blocking.mc()); // cache block size along the M direction
70
71 std::size_t sizeA = kc*mc;
72 std::size_t sizeB = kc*cols;
73
74 ei_declare_aligned_stack_constructed_variable(Scalar, blockA, sizeA, blocking.blockA());
>>> CID 1341900: (BAD_ALLOC_ARITHMETIC)
>>> Adding an offset to the result of a call to "__builtin_alloca" might indicate an under-allocation.
75 ei_declare_aligned_stack_constructed_variable(Scalar, blockB, sizeB, blocking.blockB());
76
77 conj_if<Conjugate> conj;
78 gebp_kernel<Scalar, Scalar, Index, OtherMapper, Traits::mr, Traits::nr, Conjugate, false> gebp_kernel;
79 gemm_pack_lhs<Scalar, Index, TriMapper, Traits::mr, Traits::LhsProgress, TriStorageOrder> pack_lhs;
80 gemm_pack_rhs<Scalar, Index, OtherMapper, Traits::nr, ColMajor, false, true> pack_rhs;
** CID 1340921: API usage errors (SWAPPED_ARGUMENTS)
________________________________________________________________________________________________________
*** CID 1340921: API usage errors (SWAPPED_ARGUMENTS)
/usr/include/Eigen/src/Core/CoreEvaluators.h: 283 in Eigen::internal::unary_evaluator<Eigen::Transpose<const Eigen::Block<const Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<double, (int)-1, (int)-1, (int)0, (int)-1, (int)-1>, (int)0, Eigen::Stride<(int)0, (int)0>>, (int)-1, (int)-1, (bool)0>, (int)-1, (int)-1, (bool)0>, (int)1, (int)-1, (bool)0>>, Eigen::internal::IndexBased, double>::coeff(long, long) const()
277 typedef typename XprType::Scalar Scalar;
278 typedef typename XprType::CoeffReturnType CoeffReturnType;
279
280 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
281 CoeffReturnType coeff(Index row, Index col) const
282 {
>>> CID 1340921: API usage errors (SWAPPED_ARGUMENTS)
>>> The positions of arguments in the call to "coeff" do not match the ordering of the parameters:
* "col" is passed to "row"
* "row" is passed to "col"
283 return m_argImpl.coeff(col, row);
284 }
285
286 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
287 CoeffReturnType coeff(Index index) const
288 {
** CID 1340577: Control flow issues (DEADCODE)
/usr/include/Eigen/src/Core/products/GeneralMatrixVector.h: 133 in Eigen::internal::general_matrix_vector_product<long, double, Eigen::internal::const_blas_data_mapper<double, long, (int)0>, (int)0, (bool)0, double, Eigen::internal::const_blas_data_mapper<double, long, (int)0>, (bool)0, (int)0>::run(long, long, const Eigen::internal::const_blas_data_mapper<double, long, (int)0> &, const Eigen::internal::const_blas_data_mapper<double, long, (int)0> &, double *, long, double)()
________________________________________________________________________________________________________
*** CID 1340577: Control flow issues (DEADCODE)
/usr/include/Eigen/src/Core/products/GeneralMatrixVector.h: 133 in Eigen::internal::general_matrix_vector_product<long, double, Eigen::internal::const_blas_data_mapper<double, long, (int)0>, (int)0, (bool)0, double, Eigen::internal::const_blas_data_mapper<double, long, (int)0>, (bool)0, (int)0>::run(long, long, const Eigen::internal::const_blas_data_mapper<double, long, (int)0> &, const Eigen::internal::const_blas_data_mapper<double, long, (int)0> &, double *, long, double)()
127 // Here we assume data are at least aligned on the base scalar type.
128 Index alignedStart = internal::first_default_aligned(res,size);
129 Index alignedSize = ResPacketSize>1 ? alignedStart + ((size-alignedStart) & ~ResPacketAlignedMask) : 0;
130 const Index peeledSize = alignedSize - RhsPacketSize*peels - RhsPacketSize + 1;
131
132 const Index alignmentStep = LhsPacketSize>1 ? (LhsPacketSize - lhsStride % LhsPacketSize) & LhsPacketAlignedMask : 0;
>>> CID 1340577: Control flow issues (DEADCODE)
>>> Execution cannot reach the expression "FirstAligned" inside this statement: "alignmentPattern = ((alignm...".
133 Index alignmentPattern = alignmentStep==0 ? AllAligned
134 : alignmentStep==(LhsPacketSize/2) ? EvenAligned
135 : FirstAligned;
136
137 // we cannot assume the first element is aligned because of sub-matrices
138 const Index lhsAlignmentOffset = lhs.firstAligned(size);
** CID 1340576: Control flow issues (DEADCODE)
/usr/include/Eigen/src/Core/products/GeneralMatrixVector.h: 225 in Eigen::internal::general_matrix_vector_product<long, double, Eigen::internal::const_blas_data_mapper<double, long, (int)0>, (int)0, (bool)0, double, Eigen::internal::const_blas_data_mapper<double, long, (int)0>, (bool)0, (int)0>::run(long, long, const Eigen::internal::const_blas_data_mapper<double, long, (int)0> &, const Eigen::internal::const_blas_data_mapper<double, long, (int)0> &, double *, long, double)()
________________________________________________________________________________________________________
*** CID 1340576: Control flow issues (DEADCODE)
/usr/include/Eigen/src/Core/products/GeneralMatrixVector.h: 225 in Eigen::internal::general_matrix_vector_product<long, double, Eigen::internal::const_blas_data_mapper<double, long, (int)0>, (int)0, (bool)0, double, Eigen::internal::const_blas_data_mapper<double, long, (int)0>, (bool)0, (int)0>::run(long, long, const Eigen::internal::const_blas_data_mapper<double, long, (int)0> &, const Eigen::internal::const_blas_data_mapper<double, long, (int)0> &, double *, long, double)()
219 _EIGEN_ACCUMULATE_PACKETS(Aligned,Aligned,Aligned);
220 break;
221 case EvenAligned:
222 for (Index j = alignedStart; j<alignedSize; j+=ResPacketSize)
223 _EIGEN_ACCUMULATE_PACKETS(Aligned,Unaligned,Aligned);
224 break;
>>> CID 1340576: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "case FirstAligned:".
225 case FirstAligned:
226 {
227 Index j = alignedStart;
228 if(peels>1)
229 {
230 LhsPacket A00, A01, A02, A03, A10, A11, A12, A13;
** CID 1340570: (CONSTANT_EXPRESSION_RESULT)
/usr/include/Eigen/src/Core/products/GeneralMatrixVector.h: 186 in Eigen::internal::general_matrix_vector_product<long, double, Eigen::internal::const_blas_data_mapper<double, long, (int)0>, (int)0, (bool)0, double, Eigen::internal::const_blas_data_mapper<double, long, (int)0>, (bool)0, (int)0>::run(long, long, const Eigen::internal::const_blas_data_mapper<double, long, (int)0> &, const Eigen::internal::const_blas_data_mapper<double, long, (int)0> &, double *, long, double)()
/usr/include/Eigen/src/Core/products/GeneralMatrixVector.h: 187 in Eigen::internal::general_matrix_vector_product<long, double, Eigen::internal::const_blas_data_mapper<double, long, (int)0>, (int)0, (bool)0, double, Eigen::internal::const_blas_data_mapper<double, long, (int)0>, (bool)0, (int)0>::run(long, long, const Eigen::internal::const_blas_data_mapper<double, long, (int)0> &, const Eigen::internal::const_blas_data_mapper<double, long, (int)0> &, double *, long, double)()
________________________________________________________________________________________________________
*** CID 1340570: (CONSTANT_EXPRESSION_RESULT)
/usr/include/Eigen/src/Core/products/GeneralMatrixVector.h: 186 in Eigen::internal::general_matrix_vector_product<long, double, Eigen::internal::const_blas_data_mapper<double, long, (int)0>, (int)0, (bool)0, double, Eigen::internal::const_blas_data_mapper<double, long, (int)0>, (bool)0, (int)0>::run(long, long, const Eigen::internal::const_blas_data_mapper<double, long, (int)0> &, const Eigen::internal::const_blas_data_mapper<double, long, (int)0> &, double *, long, double)()
180 {
181 alignedStart = 0;
182 alignedSize = size;
183 alignmentPattern = AllAligned;
184 }
185
>>> CID 1340570: (CONSTANT_EXPRESSION_RESULT)
>>> The expression "true /* FirstAligned */ && alignmentStep == 1" is suspicious because it performs a Boolean operation on a constant other than 0 or 1.
186 const Index offset1 = (FirstAligned && alignmentStep==1)?3:1;
187 const Index offset3 = (FirstAligned && alignmentStep==1)?1:3;
188
189 Index columnBound = ((cols-skipColumns)/columnsAtOnce)*columnsAtOnce + skipColumns;
190 for (Index i=skipColumns; i<columnBound; i+=columnsAtOnce)
191 {
/usr/include/Eigen/src/Core/products/GeneralMatrixVector.h: 187 in Eigen::internal::general_matrix_vector_product<long, double, Eigen::internal::const_blas_data_mapper<double, long, (int)0>, (int)0, (bool)0, double, Eigen::internal::const_blas_data_mapper<double, long, (int)0>, (bool)0, (int)0>::run(long, long, const Eigen::internal::const_blas_data_mapper<double, long, (int)0> &, const Eigen::internal::const_blas_data_mapper<double, long, (int)0> &, double *, long, double)()
181 alignedStart = 0;
182 alignedSize = size;
183 alignmentPattern = AllAligned;
184 }
185
186 const Index offset1 = (FirstAligned && alignmentStep==1)?3:1;
>>> CID 1340570: (CONSTANT_EXPRESSION_RESULT)
>>> The expression "true /* FirstAligned */ && alignmentStep == 1" is suspicious because it performs a Boolean operation on a constant other than 0 or 1.
187 const Index offset3 = (FirstAligned && alignmentStep==1)?1:3;
188
189 Index columnBound = ((cols-skipColumns)/columnsAtOnce)*columnsAtOnce + skipColumns;
190 for (Index i=skipColumns; i<columnBound; i+=columnsAtOnce)
191 {
192 RhsPacket ptmp0 = pset1<RhsPacket>(alpha*rhs(i, 0)),
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZIlZa20oQ0xtvekoaSXYBwgZYh7yqZ4T857KvBwnvzEg-3D-3D_Vulo-2FzB1zz6bqp-2F-2Bl-2FpBD-2BzKk1Nu56XtBupWJitvnTD-2F6uTQRnx8Tq3rQ2v2I0JPU0KeaUQBTXtyvDliBmWWGs3h7cfn5-2Fr98dM6b8gl-2F-2FV-2F3PDcjVE5tsTOz3UH8NUk19cqNbEl-2B669wviVIAxDKfiP8656aT7eL7ZwCddA1qFaaXja-2Bx5T7-2BIbwc0OiMxrh78s3JQ6h-2FDj4WuIrdxK7fBGL0mEUMBRPV0eWxjP5WI-3D
To manage Coverity Scan email notifications for "digikam-devel at kde.org", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4g-2BkTwi3e7HlDkvMAkUMj2-2FFhZ2O-2BELTTy-2Fl1ea1gxKqmntchu8-2BeAOkExRtki0102MqL9th0o1rOws5-2F-2FQDFdjkpeJaB-2FdUMxPk-2B7ZQUGV0-3D_Vulo-2FzB1zz6bqp-2F-2Bl-2FpBD-2BzKk1Nu56XtBupWJitvnTD-2F6uTQRnx8Tq3rQ2v2I0JPdvwdqj3lXgSrNb4h8KXCAtC9qnAFsPNbMPakDmCBp2TkHcoMNVlHv-2B8Ep3TP4YJu3b98CQu22c8uKYxgldzr-2Fb43oEpoS23OLGx2W-2BfmCz9DlBe-2BLBtVGcPy0YubvMTPvzIC29ia3mKIepQAnbETwINtR53j6pPYGQozgPDj-2Bcc-3D
More information about the Digikam-devel
mailing list