Skip to content
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

use std::stof with try/catch instead of std::regex #40915

Closed
wants to merge 1 commit into from

Conversation

smuzaffar
Copy link
Contributor

Follow up on #40902 , this Pr proposes to use std::stof with try/catch to convert a string to double instead of using regex. This should avoid the ASAN relval failure we are getting after enabling LTO. Local tests shows that workflow 1.0 runs for ASAN

1.0_ProdMinBias Step0-PASSED Step1-PASSED Step2-PASSED  - time date Wed Mar  1 14:43:30 2023-date Wed Mar  1 14:35:32 2023; exit: 0 0 0
1 1 1 tests passed, 0 0 0 failed

@smuzaffar
Copy link
Contributor Author

please test for CMSSW_13_1_ASAN_X

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 1, 2023

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40915/34399

  • This PR adds an extra 12KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 1, 2023

A new Pull Request was created by @smuzaffar (Malik Shahzad Muzaffar) for master.

It involves the following packages:

  • PhysicsTools/IsolationAlgos (reconstruction)

@mandrenguyen, @clacaputo can you please review it and eventually sign? Thanks.
@perrotta, @dpiparo, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 1, 2023

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-fdd675/30974/summary.html
COMMIT: 46bdccd
CMSSW: CMSSW_13_1_ASAN_X_2023-02-27-2300/el8_amd64_gcc11
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/40915/30974/install.sh to create a dev area with all the needed externals and cmssw changes.

@smuzaffar
Copy link
Contributor Author

Please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 2, 2023

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-fdd675/30979/summary.html
COMMIT: 46bdccd
CMSSW: CMSSW_13_1_X_2023-03-01-1100/el8_amd64_gcc11
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/40915/30979/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially removed 2 lines from the logs
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3529699
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3529677
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 213 log files, 164 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@smuzaffar
Copy link
Contributor Author

@cms-sw/reconstruction-l2 can you please review this. This should fix ASAN/UBSAN massive failure

if (isNumber(weight)) {
//std::cout << "Weight is a simple number, " << toNumber(weight) << std::endl;
weight_ = toNumber(weight);
try {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we really go with the exception approach (which we generally disfavor), please add

Suggested change
try {
CMS_SA_ALLOW try {

to avoid static analyzer complaints.

@smuzaffar
Copy link
Contributor Author

Superseded by #40984

@smuzaffar smuzaffar closed this Mar 8, 2023
@smuzaffar smuzaffar deleted the asan-regex branch March 8, 2023 06:58
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.

3 participants