-
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
use std::stof with try/catch instead of std::regex #40915
Conversation
please test for CMSSW_13_1_ASAN_X |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40915/34399
|
A new Pull Request was created by @smuzaffar (Malik Shahzad Muzaffar) for master. It involves the following packages:
@mandrenguyen, @clacaputo can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-fdd675/30974/summary.html |
Please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-fdd675/30979/summary.html Comparison SummarySummary:
|
@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 { |
There was a problem hiding this comment.
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
try { | |
CMS_SA_ALLOW try { |
to avoid static analyzer complaints.
Superseded by #40984 |
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