netgen/libsrc/occ
Monty Montgomery de7ffc5906 Eliminate a "C++ initialization order fiasco" for geometryregister
Current initialization of the global geometryregister suffers from a
classic 'initialization order fiasco'.  Depending on the order the
compilation units are loaded/linked, the initialization of the global
geometryregisterarray is not guaranteed to happen (and indeed often
does not happen) before it is used.  This leads to entries being
appended before it's initialized (usually 'suceeding, but potentially
causing memory corruption if the segment at that point isn't zeroed),
initialization then happening halfway through (wiping the initial
entries) and then the last entries being the only ones that show up.

The net effect is either a crash at startup, or several geometry types
seeming to be missing.  Eg, step files will oad, but STL files are
just ignored.  The bug is actively observed on, eg, Linux.

This patch implements a simple 'initialize at first access' convention
for the array, eliminating the ordering problem.

I've not reviewed the rest of the source for other potential examples
of the fiasco pattern; this fixes only the geometryregister, since
that was actively biting.
2022-05-22 11:29:10 -04:00
..
CMakeLists.txt rework build system, separate gui and non-gui code 2022-05-05 14:39:31 +02:00
occ_edge.cpp occ - fix meshing a sphere (need to keep degenerate edges) 2022-01-04 16:09:00 +01:00
occ_edge.hpp fix PropagateIdentifications after Glue 2021-12-16 18:35:43 +01:00
occ_face.cpp [occ] gp_GTrsf for anisotropic trafos 2022-03-28 18:34:22 +00:00
occ_face.hpp [occ] inner point of surface -> surface mesh 2022-03-30 12:47:07 +02:00
occ_solid.hpp OCC Mesher Cleanup 2021-11-28 15:14:41 +00:00
occ_utils.cpp [occ] gp_GTrsf for anisotropic trafos 2022-03-28 18:34:22 +00:00
occ_utils.hpp __ge__ and __le__ operator for DirectionalInterval 2022-05-05 17:32:25 +02:00
occ_vertex.cpp OCC Mesher Cleanup 2021-11-28 15:14:41 +00:00
occ_vertex.hpp OCC Mesher Cleanup 2021-11-28 15:14:41 +00:00
occconstruction.cpp occ build visualization mesh 2009-02-01 23:08:39 +00:00
occgenmesh.cpp [occ] inner point of surface -> surface mesh 2022-03-30 12:47:07 +02:00
occgeom.cpp rework build system, separate gui and non-gui code 2022-05-05 14:39:31 +02:00
occgeom.hpp [occ] inner point of surface -> surface mesh 2022-03-30 12:47:07 +02:00
occmeshsurf.cpp Fix various typos 2022-03-25 18:22:05 -04:00
occmeshsurf.hpp OCC Mesher Cleanup 2021-11-28 15:14:41 +00:00
occpkg.cpp Eliminate a "C++ initialization order fiasco" for geometryregister 2022-05-22 11:29:10 -04:00
Partition_Inter2d.cxx Fix various typos 2022-03-25 18:22:05 -04:00
Partition_Inter2d.hxx Apply patches for OpenCasCade 7 by Lorenz Lechner 2017-01-31 19:21:25 +01:00
Partition_Inter2d.ixx autotools configure 2009-01-13 18:32:10 +00:00
Partition_Inter2d.jxx autotools configure 2009-01-13 18:32:10 +00:00
Partition_Inter3d.cxx Fix various typos 2022-03-25 18:22:05 -04:00
Partition_Inter3d.hxx modernize code to use handle 2019-10-07 15:17:03 +02:00
Partition_Inter3d.ixx autotools configure 2009-01-13 18:32:10 +00:00
Partition_Inter3d.jxx autotools configure 2009-01-13 18:32:10 +00:00
Partition_Loop2d.cxx Cleanup use of M_PI/PI defines 2021-03-10 00:46:58 +01:00
Partition_Loop2d.hxx Apply patches for OpenCasCade 7 by Lorenz Lechner 2017-01-31 19:21:25 +01:00
Partition_Loop2d.ixx autotools configure 2009-01-13 18:32:10 +00:00
Partition_Loop2d.jxx autotools configure 2009-01-13 18:32:10 +00:00
Partition_Loop3d.cxx autotools 2009-01-12 23:40:13 +00:00
Partition_Loop3d.hxx Apply patches for OpenCasCade 7 by Lorenz Lechner 2017-01-31 19:21:25 +01:00
Partition_Loop3d.ixx autotools configure 2009-01-13 18:32:10 +00:00
Partition_Loop3d.jxx autotools configure 2009-01-13 18:32:10 +00:00
Partition_Loop.cxx Misc. typos 2018-02-06 14:12:24 -05:00
Partition_Loop.hxx Apply patches for OpenCasCade 7 by Lorenz Lechner 2017-01-31 19:21:25 +01:00
Partition_Loop.ixx autotools configure 2009-01-13 18:32:10 +00:00
Partition_Loop.jxx autotools configure 2009-01-13 18:32:10 +00:00
Partition_Spliter.cxx Fix various typos 2022-03-25 18:22:05 -04:00
Partition_Spliter.hxx modernize code to use handle 2019-10-07 15:17:03 +02:00
Partition_Spliter.ixx autotools configure 2009-01-13 18:32:10 +00:00
Partition_Spliter.jxx autotools configure 2009-01-13 18:32:10 +00:00
python_occ_basic.cpp __ge__ and __le__ operator for DirectionalInterval 2022-05-05 17:32:25 +02:00
python_occ_shapes.cpp Merge branch 'occ_consistent_maxh' into 'master' 2022-05-07 15:10:57 +02:00
python_occ.cpp little mpi cleanup, meshing+distribution in one call 2022-03-15 09:13:09 +01:00
utilities.h Misc. typos 2018-02-06 14:12:24 -05:00
vsocc.cpp Draw occ geometry. Change edge color to black 2021-12-02 12:10:57 +01:00
vsocc.hpp Rename Array to NgArray 2019-07-09 10:39:16 +02:00