MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0025429Community[OCCT] OCCT:Codingpublic2014-10-29 06:112017-07-20 19:48
ReporterEpy 
Assigned Tobugmaster 
PrioritynormalSeveritymajor 
StatusclosedResolutionduplicate 
PlatformAllOSOS Version
Product Version[OCCT] 6.7.1 
Target Version[OCCT] 7.2.0Fixed in Version 
Summary0025429: Invalid use of NULL references
DescriptionOriginal summary: Increased testing failures with Clang 3.4 and later

With newer versions of Clang, the number of bad and failed tests has increased severely. Lots of SIGILLs and SIGFPEs. At least part of the problem is using NULL as a reference (C++ does not allow NULL references), e.g.

inline TColStd_Array1OfReal& BSplCLib::NoWeights()
{
  return (*((TColStd_Array1OfReal*) NULL));
}

Here is a possibly complete list of instances where this occurs:

src/BRep/BRep_CurveRepresentation.cxx:186: return *((Handle(Geom_Curve)*) NULL);
src/BRep/BRep_CurveRepresentation.cxx:211: return *((Handle(Geom_Surface)*) NULL);
src/BRep/BRep_CurveRepresentation.cxx:223: return *((Handle(Geom2d_Curve)*) NULL);
src/BRep/BRep_CurveRepresentation.cxx:234: return *((Handle(Geom2d_Curve)*) NULL);
src/BRep/BRep_CurveRepresentation.cxx:266: return *((GeomAbs_Shape*) NULL);
src/BRep/BRep_CurveRepresentation.cxx:288: return *((Handle(Geom_Surface)*) NULL);
src/BRep/BRep_CurveRepresentation.cxx:300: return *((TopLoc_Location*) NULL);
src/BRep/BRep_CurveRepresentation.cxx:313: return *((Handle(Poly_Polygon3D)*) NULL);
src/BRep/BRep_CurveRepresentation.cxx:335: return *((Handle(Poly_Polygon2D)*) NULL);
src/BRep/BRep_CurveRepresentation.cxx:357: return *((Handle(Poly_PolygonOnTriangulation)*) NULL);
src/BRep/BRep_CurveRepresentation.cxx:393: return *(Handle(Poly_PolygonOnTriangulation)*)NULL;
src/BRep/BRep_CurveRepresentation.cxx:404: return *(Handle(Poly_Triangulation)*)NULL;
src/BRep/BRep_CurveRepresentation.cxx:417: return *((Handle(Poly_Polygon2D)*) NULL);
src/BRep/BRep_PointRepresentation.cxx:136: return *((Handle(Geom_Curve)*) NULL);
src/BRep/BRep_PointRepresentation.cxx:159: return *((Handle(Geom2d_Curve)*) NULL);
src/BRep/BRep_PointRepresentation.cxx:182: return *((Handle(Geom_Surface)*) NULL);
src/BSplCLib/BSplCLib.lxx:38: return (*((TColStd_Array1OfReal*) NULL));
src/BSplCLib/BSplCLib.lxx:48: return (*((TColStd_Array1OfInteger*) NULL));
src/BSplSLib/BSplSLib.lxx:100: return (*((TColStd_Array2OfReal*) NULL));
src/Expr/Expr_BinaryExpression.cxx:77: return *( ( Handle_Expr_GeneralExpression* )NULL );
src/NCollection/NCollection_DoubleMap.hxx:133: return * (TheKey2Type *) NULL; // For compiler
src/NCollection/NCollection_IndexedMap.hxx:123: return * (TheKeyType *) NULL; // This for compiler
src/NCollection/NCollection_Map.hxx:113: return * (TheKeyType *) NULL; // For compiler
src/PLib/PLib.lxx:19: return (*((TColStd_Array1OfReal*) NULL ));
src/PLib/PLib.lxx:24: return (*((TColStd_Array2OfReal*) NULL ));
TagsNo tags attached.
Test case number
Attached Files

- Relationships
duplicate of 0026042closedbugmaster OCCT won't work with the latest Xcode 
related to 0025454closedbugmaster Large number of test suite bads/failures starting with Clang 3.4 

-  Notes
(0068487)
kgv (developer)
2017-07-20 12:33
edited on: 2017-07-20 12:33

The bug should be fixed in scope of 0026042, thus the issue can be closed.


- Issue History
Date Modified Username Field Change
2014-10-29 06:11 Epy New Issue
2014-10-29 06:11 Epy Assigned To => mkv
2014-10-29 06:19 abv Assigned To mkv => abv
2014-10-29 06:19 abv Status new => assigned
2014-10-29 06:19 abv Category OCCT:Tests => OCCT:Coding
2014-10-29 06:19 abv Target Version => 7.1.0
2014-10-29 06:19 abv Summary Increased testing failures with Clang 3.4 and later => Invalid use of NULL references
2014-10-29 06:19 abv Description Updated View Revisions
2015-04-09 21:09 kgv Relationship added related to 0026042
2015-09-25 00:57 abv Assigned To abv => akz
2015-09-25 00:57 abv Target Version 7.1.0 => 7.0.0
2015-10-14 12:03 kgv Relationship added related to 0025454
2016-02-08 16:18 abv Assigned To akz => abv
2016-02-08 16:18 abv Target Version 7.0.0 => 7.1.0
2016-11-03 18:33 abv Target Version 7.1.0 => 7.2.0
2017-07-20 12:33 kgv Note Added: 0068487
2017-07-20 12:33 kgv Assigned To abv => bugmaster
2017-07-20 12:33 kgv Status assigned => feedback
2017-07-20 12:33 kgv Resolution open => duplicate
2017-07-20 12:33 kgv Note Edited: 0068487 View Revisions
2017-07-20 12:33 kgv Relationship replaced duplicate of 0026042
2017-07-20 19:48 bugmaster Status feedback => closed


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker