Project

General

Profile

Bug #4473

Squish Coco memory issues with CameraFactory, ProjectionFactory, NumericalApproximation, ProcessGroundPolygons

Added by Ian Humphrey about 1 year ago. Updated about 1 year ago.

Status:
Acknowledged
Priority:
Normal
Assignee:
-
Category:
Infrastructure
Target version:
-
Impact:
Software Version:
Test Reviewer:

Description

When building the api with MODE=TC and the make unitTest MODE=TC, CameraFactory, ProjectionFactory, NumericalApproximation, and ProcessGroundPolygons' unit tests produce memory dumps (the test still runs and produces coverage statistics).

(Note, this happens when building the api without MODE=TC and then compiling, linking, and running CameraFactory's unit test with MODE=TC).
Fixed by #2402 PROG commit.

Investigate core dumps for NumericalApproximation and ProcessGroundPolygons.

For CameraFactory and ProjectionFactory, this likely happens because these classes have static class members, and when the unitTest executables are linked, they are linked against their own classes' .so (e.g. libCameraFactory.so) and the libisis3.X.XX.so library. This produces two symbols for the static class member variable.

Part of this fix may require removing the changes for #2402's PROG commit (revision 7176). In isismake.objs, the lines

if [ "$(CODE_COVERAGE_BIN_DIR)" == "" ]; then
...
else

would be removed, if necessary.

To fix this, one approach may be copying the libisis3.X.XX.so or .a to the class's directory area, then removing (for example) the CameraFactory.o from the shared library / archive.

Another possibility is to copy the static libisisX.a to the class directory as part of the unitTest target/recipe. This would cause the unitTest to be statically linked against this libisis library, and this prevents the core dump. Further investigation would be required as to why this fixes the issue, and it is worth noting that this would increase the size of the executables.


Related issues

Related to ISIS - Feature #2402: Make the code test coverage tools work with coco 3.3 Closed

History

#1 Updated by Ian Humphrey about 1 year ago

  • Description updated (diff)

#2 Updated by Ian Humphrey about 1 year ago

  • Subject changed from Squish Coco memory issues with CameraFactory and ProjectionFactory to Squish Coco memory issues with CameraFactory, ProjectionFactory, NumericalApproximation, ProcessGroundPolygons
  • Description updated (diff)

#4 Updated by Ian Humphrey about 1 year ago

  • Description updated (diff)

#5 Updated by Ian Humphrey about 1 year ago

  • Description updated (diff)

#6 Updated by Ian Humphrey about 1 year ago

  • Parent task deleted (#2402)

#7 Updated by Ian Humphrey about 1 year ago

  • Related to Feature #2402: Make the code test coverage tools work with coco 3.3 added

Also available in: Atom PDF