Skip to content

Commit 2888c5f

Browse files
Fix potential memory problems in GICP and IncrementalRegistration (#5557)
* Add missing aligned operator new to GICP: Matrix4 typedef might be vectorizable when Scalar == float * Add missing aligned operator new to IncrementalRegistration
1 parent 9dc4a0e commit 2888c5f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

registration/include/pcl/registration/gicp.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ class GeneralizedIterativeClosestPoint
113113
typename IterativeClosestPoint<PointSource, PointTarget, Scalar>::Matrix4;
114114
using AngleAxis = typename Eigen::AngleAxis<Scalar>;
115115

116+
PCL_MAKE_ALIGNED_OPERATOR_NEW;
117+
116118
/** \brief Empty constructor. */
117119
GeneralizedIterativeClosestPoint()
118120
: k_correspondences_(20)

registration/include/pcl/registration/incremental_registration.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ class IncrementalRegistration {
111111
/** \brief Set registration instance used to align clouds */
112112
inline void setRegistration(RegistrationPtr);
113113

114+
PCL_MAKE_ALIGNED_OPERATOR_NEW;
115+
114116
protected:
115117
/** \brief last registered point cloud */
116118
PointCloudConstPtr last_cloud_;

0 commit comments

Comments
 (0)