Skip to content

[UBSAN] Fast sim doing improper cast to RectangularPixelTopology #50664

@Dr15Jones

Description

@Dr15Jones

The UBSAN build is reporting many errors for workflows 36434.0 and 36834.0 of the type

runtime error: downcast of address 0x1495929a4d00 which does not point to an object of type 'RectangularPixelTopology'

Looking at one in particular seems to readily show the problem

36434.0/step2:FastSimulation/TrackingRecHitProducer/src/PixelTemplateSmearerBase.cc:346:55: runtime error: downcast of address 0x1495929a4d00 which does not point to an object of type 'RectangularPixelTopology'

which points to

const PixelTopology* theSpecificTopology = &(detUnit->specificType().specificTopology());
const RectangularPixelTopology* rectPixelTopology = static_cast<const RectangularPixelTopology*>(theSpecificTopology);

where a static_cast<const RectangularPixelTopology*> which evidently being done on a pointer to an object which is not a RectangularPixelTopology.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions