in the basic use of the LLT, the input matrix is copied to an internal memory (in advanced use, the input matrix can be used as internal memory to avoid this copy). The decomposition is then done in place, from the left to the right, i.e. the column of the internal memory are sequentially replaced by the columns of the matrix L. The algorithm works only on the lower triangular part of the matrix and thus the strictly upper triangular part of the internal memory is left untouched.
If a non-positive pivot is encountered, the decomposition stops, leaving the internal memory in its current state, meaning that the rightmost part of the internal memory will be left untouched and thus still contains the elements of the original matrix.
The matrixL() function returns a lower triangular view on the internal memory.
I can't tell what's happening in case other problems (which ones?) arise.
The code below can help illustrate this behavior.
#include <Eigen/Core>
#include <Eigen/Cholesky>
#include <Eigen/QR>
#include <iostream>
using namespace Eigen;
int main()
{
int n = 5;
//random eigen values, all positive
VectorXd s = VectorXd::Random(n).cwiseAbs();
s[0] = -s[0]; //make one eigen value negative. Change which one to see different behavior
//Generate a random orthogonal matrix
MatrixXd R = MatrixXd::Random(n, n);
HouseholderQR<MatrixXd> qr(R);
const auto& Q = qr.householderQ();
//M is a symmetric matrix with all eigen values positive but one
MatrixXd M = Q * s.asDiagonal().toDenseMatrix() * Q.transpose();
std::cout << "M=\n" << M << "\n\n";
auto llt = M.llt(); //perform Cholesky decomposition
std::cout << "info: " <<
llt.info() << "\n";
std::cout << "L=\n" << llt.matrixL().toDenseMatrix() << "\n\n";
std::cout << "Internal memory:\n" << llt.matrixLLT() << "\n\n";
std::cout << "What elements are different between L and the lower part of M (1 when different, 0 when equal):\n";
std::cout << (M.template triangularView<Lower>().toDenseMatrix().cwiseEqual(llt.matrixL().toDenseMatrix())).select(MatrixXd::Zero(n, n), MatrixXd::Ones(n, n)) << "\n\n";
std::cout << "What elements are different between the internal memory and M (1 when different, 0 when equal):\n";
std::cout << M.cwiseEqual(llt.matrixLLT()).select(MatrixXd::Zero(n, n), MatrixXd::Ones(n, n)) << std::endl;
}