-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Out of bounds read in SiStripMonitorCluster::analyze #38729
Comments
assign dqm |
New categories assigned: dqm @jfernan2,@ahmad3213,@micsucmed,@rvenditti,@emanueleusai,@pmandrik you have been requested to review this Pull request/Issue and eventually sign? Thanks |
A new Issue was created by @Dr15Jones Chris Jones. @Dr15Jones, @perrotta, @dpiparo, @rappoccio, @makortel, @smuzaffar, @qliphy can you please review it and eventually sign/assign? Thanks. cms-bot commands are listed here |
The relevant bits of the log are
|
FYI @cms-sw/trk-dpg-l2 |
Given we are dealing with a read off the end of a The relevant pieces of code are
and
I bet the call to |
It's worth noting that this shows up in the new RAW' workflow introduced in #38423 by @mandrenguyen.
This is not very plausibile. What is more possible is that the strip number passed to get the noise is "wrong" in case of approximate "rectangular" clusters employed in that workflow. |
indeed plugging: diff --git a/DQM/SiStripMonitorCluster/src/SiStripMonitorCluster.cc b/DQM/SiStripMonitorCluster/src/SiStripMonitorCluster.cc
index 8cb59182c9a..b29598f397c 100644
--- a/DQM/SiStripMonitorCluster/src/SiStripMonitorCluster.cc
+++ b/DQM/SiStripMonitorCluster/src/SiStripMonitorCluster.cc
@@ -868,6 +868,9 @@ void SiStripMonitorCluster::analyze(const edm::Event& iEvent, const edm::EventSe
for (uint iamp = 0; iamp < ampls.size(); iamp++) {
if (ampls[iamp] > 0) { // nonzero amplitude
cluster_signal += ampls[iamp];
+
+ std::cout << "iamp: " << iamp << " strip number: " << clusterIter->firstStrip() + iamp << std::endl;
+
if (!siStripQuality.IsStripBad(qualityRange, clusterIter->firstStrip() + iamp)) {
noise = siStripNoises.getNoise(clusterIter->firstStrip() + iamp, detNoiseRange) /
siStripGain.getStripGain(clusterIter->firstStrip() + iamp, detGainRange); I get before the crash: iamp: 1 strip number: 765
iamp: 0 strip number: 32767
A fatal system signal has occurred: segmentation violation
The following is the call stack containing the origin of the signal. the cluster with |
assign reconstruction |
New categories assigned: reconstruction @jpata,@clacaputo you have been requested to review this Pull request/Issue and eventually sign? Thanks |
in this line
This appears to solve the issue: diff --git a/DataFormats/SiStripCluster/src/SiStripCluster.cc b/DataFormats/SiStripCluster/src/SiStripCluster.cc
index b03ebb025a9..9a03f666b02 100644
--- a/DataFormats/SiStripCluster/src/SiStripCluster.cc
+++ b/DataFormats/SiStripCluster/src/SiStripCluster.cc
@@ -28,7 +28,7 @@ SiStripCluster::SiStripCluster(const SiStripApproximateCluster cluster) : error_
amplitudes_.resize(cluster.width(), cluster.avgCharge());
//initialize firstStrip_
- firstStrip_ = cluster.barycenter() - cluster.width() / 2;
+ firstStrip_ = std::max(0.f, cluster.barycenter() - cluster.width() / 2);
} |
The ASAN report
https://cmssdt.cern.ch/SDT/cgi-bin/logreader/el8_amd64_gcc10/CMSSW_12_5_ASAN_X_2022-07-13-1100/pyRelValMatrixLogs/run/140.58_RunHI2018+RunHI2018+RAWPRIMEHI18+RECOHID18APPROXCLUSTERS+HARVESTDHI18/step3_RunHI2018+RunHI2018+RAWPRIMEHI18+RECOHID18APPROXCLUSTERS+HARVESTDHI18.log#/
Shows a
heap-buffer-overflow
The text was updated successfully, but these errors were encountered: