Repository navigation
Fix out-of-bounds read in GCP core_vertex_ids - #284
Merged
Merged
Conversation
- Map each core point to its vertex slot instead of indexing the vertex ids with DOF indices - Return one id per core point (N_CORE_POINTS) rather than per DOF Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Define EIGEN_DONT_VECTORIZE on finite-diff when SIMD is on, as for MeshFEMSparse - Avoids alignment and allocator mismatches on matrices that cross the library boundary Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
lcov 2.4 on ubuntu-26.04 reports an unhit deleting destructor as an inconsistency, which fails the --remove step. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #284 +/- ##
==========================================
- Coverage 96.97% 96.76% -0.22%
==========================================
Files 221 221
Lines 22426 22502 +76
Branches 1540 1559 +19
==========================================
+ Hits 21748 21774 +26
- Misses 678 728 +50
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes an out-of-bounds read in
GCPCollisionTemplate::core_vertex_ids().m_vertex_ids(one entry per vertex, 4 for Edge3-Edge3) with DOF indices that run up to 11.TangentialCollisions::build, reads entries 0-3, so the out-of-range values were never used.-D_GLIBCXX_ASSERTIONS,std::vector::operator[]aborts on the read.finitediff_finitediffgetsEIGEN_DONT_VECTORIZE=1when SIMD is on, likeMeshFEMSparse, so matrices our lambdas return and finite-diff reshapes or frees share one alignment.scalable-ccdpin.API changes
core_vertex_ids()returnsstd::array<index_t, N_CORE_POINTS>instead ofstd::array<index_t, N_CORE_DOFS>.TangentialCollisions::buildis the only caller in the codebase and is unaffected.Type of change
How Has This Been Tested?
-D_GLIBCXX_ASSERTIONSpasses.Smooth friction force no_mu and no_contact_force_multiplier,Smooth friction force jacobian 3D, andSmooth friction force jacobian of a single collisionaborted atstl_vector.h:1282incore_vertex_idsbefore this change and pass after it.Test Configuration:
Checklist