-
Notifications
You must be signed in to change notification settings - Fork 13
Description
I am working my way through some of the bugs found by clang's static analyzer. #1067
In DGeometry.cc, it seems to have found a path leaving values uninitialized due to an incomplete GetCompositeMaterial function.
According to a comment on line 580, GetMaterials() calls GetCompositeMaterial() when querying the composite tag fails. However, GetCompositeMaterial() seems to be a stub. It takes density and radlen as references but never assigns to them. It extracts component name and mass fraction, logs them to debug, and quits. Theoretically that could leave those variables uninitialized when they are passed to the DMaterial ctor on line 588.
Since this code hasn't been touched in 15 years, I would presume that querying the composite tag never fails, since this would've probably reared its head by now.