-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[sap] Avoid factoring ununitialized memory #21430
[sap] Avoid factoring ununitialized memory #21430
Conversation
Thanks, valgrind! Also respell the initializer list helpers for clarity.
@drake-jenkins-bot linux-jammy-clang-bazel-experimental-valgrind-memcheck please |
+@sherm1 for both reviews, please (follow-up from #21421). \CC @amcastro-tri FYI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: LGTM missing from assignee sherm1(platform)
multibody/contact_solvers/sap/dense_supernodal_solver.cc
line 10 at r1 (raw file):
namespace internal { int SafeGetCols(const BlockSparseMatrix<double>* J) {
FYI This dance was not necessary. The line J_(SafeDeference("J", J)),
already proved that J was non-null; we don't need to re-check before calling J->cols()
.
@drake-jenkins-bot linux-jammy-clang-bazel-experimental-release please (flake) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: complete! all discussions resolved, LGTM from assignee sherm1(platform)
multibody/contact_solvers/sap/dense_supernodal_solver.cc
line 23 at r1 (raw file):
: A_(SafeDeference("A", A)), J_(SafeDeference("J", J)), H_(Eigen::MatrixXd::Zero(J->cols(), J->cols())),
FYI attn @amcastro-tri
Is there any reason you want to leave H_ uninitialized? If so you'll need to rework this so it doesn't look at any of that uninitialized memory. For now we're going to set it to zero to fix CI but you can revisit later if it's important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI failure looks like an unrelated flake?
Reviewable status: complete! all discussions resolved, LGTM from assignee sherm1(platform)
@drake-jenkins-bot linux-jammy-clang-bazel-experimental-everything-release please (flake) |
Thanks, valgrind! Also respell the initializer list helpers for clarity.
Hotfix for #21421:
This change is