mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-06 05:05:12 +08:00
Fix another UB access.
This commit is contained in:
parent
5527e78a64
commit
0cef325b07
@ -97,6 +97,11 @@ struct triangular_solver_selector<Lhs,Rhs,Side,Mode,NoUnrolling,Dynamic>
|
|||||||
typedef internal::gemm_blocking_space<(Rhs::Flags&RowMajorBit) ? RowMajor : ColMajor,Scalar,Scalar,
|
typedef internal::gemm_blocking_space<(Rhs::Flags&RowMajorBit) ? RowMajor : ColMajor,Scalar,Scalar,
|
||||||
Rhs::MaxRowsAtCompileTime, Rhs::MaxColsAtCompileTime, Lhs::MaxRowsAtCompileTime,4> BlockingType;
|
Rhs::MaxRowsAtCompileTime, Rhs::MaxColsAtCompileTime, Lhs::MaxRowsAtCompileTime,4> BlockingType;
|
||||||
|
|
||||||
|
// Nothing to solve.
|
||||||
|
if (actualLhs.size() == 0 || rhs.size() == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
BlockingType blocking(rhs.rows(), rhs.cols(), size, 1, false);
|
BlockingType blocking(rhs.rows(), rhs.cols(), size, 1, false);
|
||||||
|
|
||||||
triangular_solve_matrix<Scalar,Index,Side,Mode,LhsProductTraits::NeedToConjugate,(int(Lhs::Flags) & RowMajorBit) ? RowMajor : ColMajor,
|
triangular_solve_matrix<Scalar,Index,Side,Mode,LhsProductTraits::NeedToConjugate,(int(Lhs::Flags) & RowMajorBit) ? RowMajor : ColMajor,
|
||||||
|
@ -424,7 +424,7 @@ struct triangular_product_impl<Mode,LhsIsTriangular,Lhs,false,Rhs,false>
|
|||||||
|
|
||||||
// Empty product, return early. Otherwise, we get `nullptr` use errors below when we try to access
|
// Empty product, return early. Otherwise, we get `nullptr` use errors below when we try to access
|
||||||
// coeffRef(0,0).
|
// coeffRef(0,0).
|
||||||
if (a_lhs.size() == 0 || a_rhs.size() == 0) {
|
if (lhs.size() == 0 || rhs.size() == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user