Skip to content

UBSAN: Fixing improper cast to RectangularPixelTopology#50883

Open
smuzaffar wants to merge 1 commit intocms-sw:masterfrom
smuzaffar:ubsan-cast-fix-RectangularPixelTopology
Open

UBSAN: Fixing improper cast to RectangularPixelTopology#50883
smuzaffar wants to merge 1 commit intocms-sw:masterfrom
smuzaffar:ubsan-cast-fix-RectangularPixelTopology

Conversation

@smuzaffar
Copy link
Copy Markdown
Contributor

@smuzaffar smuzaffar commented May 5, 2026

This PR proposes to drop the explicit improper cast to RectangularPixelTopology. With Phase2 geometry

const PixelTopology* theSpecificTopology = &(detUnit->specificType().specificTopology());

is RectangularPixelPhase2Topology instead of RectangularPixelTopology . Existing code explicitly casts it to RectangularPixelTopology. See #50664 where UBSAN IBs reports this runtime issue/error.

As all the baseclass member functions called via rectPixelTopology are overridden in RectangularPixelTopology and RectangularPixelPhase2Topology so there is no need of explicit cast. One should be able to just use the base pointer to PixelTopology

Fixes #50664

@cmsbuild
Copy link
Copy Markdown
Contributor

cmsbuild commented May 5, 2026

cms-bot internal usage

@cmsbuild
Copy link
Copy Markdown
Contributor

cmsbuild commented May 5, 2026

@cmsbuild
Copy link
Copy Markdown
Contributor

cmsbuild commented May 5, 2026

A new Pull Request was created by @smuzaffar for master.

It involves the following packages:

  • FastSimulation/TrackingRecHitProducer (fastsim)

@civanch, @cmsbuild, @kpedro88, @mdhildreth, @ssekmen can you please review it and eventually sign? Thanks.
@matt-komm, @sbein this is something you requested to watch as well.
@ftenchini, @mandrenguyen, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@smuzaffar
Copy link
Copy Markdown
Contributor Author

please test

@smuzaffar
Copy link
Copy Markdown
Contributor Author

please test workflow 36434.0 with #50882 for CMSSW_17_0_UBSAN_X

@cmsbuild
Copy link
Copy Markdown
Contributor

cmsbuild commented May 5, 2026

+1

Size: This PR adds an extra 28KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a33227/53081/summary.html
COMMIT: 309d7a1
CMSSW: CMSSW_17_0_X_2026-05-05-1100/el8_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/50883/53081/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

@kpedro88
Copy link
Copy Markdown
Contributor

kpedro88 commented May 5, 2026

+fastsim

@cmsbuild
Copy link
Copy Markdown
Contributor

cmsbuild commented May 5, 2026

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @sextonkennedy, @ftenchini, @mandrenguyen (and backports should be raised in the release meeting by the corresponding L2)
Notice This PR was tested with additional Pull Request(s), please also merge them if necessary: #50882

@cmsbuild
Copy link
Copy Markdown
Contributor

cmsbuild commented May 5, 2026

-1

Failed Tests: UnitTests
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a33227/53082/summary.html
COMMIT: 309d7a1
CMSSW: CMSSW_17_0_UBSAN_X_2026-05-04-2300/el8_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/50883/53082/install.sh to create a dev area with all the needed externals and cmssw changes.

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a33227/53082/git-recent-commits.json
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a33227/53082/git-merge-result

Failed Unit Tests

I found 1 errors in the following unit tests:

---> test testIntrusiveAllocMonitorOutput had ERRORS

@smuzaffar
Copy link
Copy Markdown
Contributor Author

https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a33227/53082/runTheMatrix-results/36434.0_TTbar_14TeV+Run4D110FS/step2_TTbar_14TeV+Run4D110FS.log shows that there are no more runtime error for improper cast to RectangularPixelTopology . There are couple of more runtime errors but those can be fixed in separate PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UBSAN] Fast sim doing improper cast to RectangularPixelTopology

3 participants