Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
RobWork
RobWork
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 20
    • Issues 20
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Requirements
    • Requirements
    • List
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards
  • SDU Robotics
  • RobWorkRobWork
  • Issues
  • #44

Closed
Open
Opened Aug 18, 2017 by Michael K. Schmidt@Michael_K_SDeveloper

Memory Bug in IndexedTriMesh class

IndexedTriMesh->getTriangle functions reads uninitialized memory. I expect that the problem arises when the values are being casted (ie. float values being reinterpreted as double in line 429-431).

However, the problem does not occur everytime IndexedTriMesh->getTriangle is called, so the problem could be something else.

Output from valgrind: ==11252== Use of uninitialised value of size 8 ==11252== at 0x50C3D01: Triangle (Triangle.hpp:56) ==11252== by 0x50C3D01: rw::geometry::IndexedTriMeshN0<double, unsigned char>::getTriangle(unsigned long) const (IndexedTriMesh.hpp:431) ==11252== by 0x407EA6: Mould::ComputeDelaunayMesh() (mould.cpp:129) ==11252== by 0x4046FC: main (main.cpp:31) ==11252== ==11252== Use of uninitialised value of size 8 ==11252== at 0x50C3D18: Triangle (Triangle.hpp:57) ==11252== by 0x50C3D18: rw::geometry::IndexedTriMeshN0<double, unsigned char>::getTriangle(unsigned long) const (IndexedTriMesh.hpp:431) ==11252== by 0x407EA6: Mould::ComputeDelaunayMesh() (mould.cpp:129) ==11252== by 0x4046FC: main (main.cpp:31) ==11252== ==11252== Use of uninitialised value of size 8 ==11252== at 0x50C3D2F: Triangle (Triangle.hpp:58) ==11252== by 0x50C3D2F: rw::geometry::IndexedTriMeshN0<double, unsigned char>::getTriangle(unsigned long) const (IndexedTriMesh.hpp:431) ==11252== by 0x407EA6: Mould::ComputeDelaunayMesh() (mould.cpp:129) ==11252== by 0x4046FC: main (main.cpp:31) ==11252==

==11252==

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: sdurobotics/RobWork#44