-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[UBSAN]runtime error applying non-zero offset 18446744073709551568 to null pointer #46908
Comments
cms-bot internal usage |
A new Issue was created by @smuzaffar. @Dr15Jones, @antoniovilela, @makortel, @mandrenguyen, @rappoccio, @sextonkennedy, @smuzaffar can you please review it and eventually sign/assign? Thanks. cms-bot commands are listed here |
ah my bad |
correct, it just says that if we have an offset or a size, then m_data must not be nullptr. |
assign core |
New categories assigned: core @Dr15Jones,@makortel,@smuzaffar you have been requested to review this Pull request/Issue and eventually sign? Thanks |
This part of warning
edmNew::DetSet would have been used. Although the offset is 47 less than 2**64-1 (to which the -1 would convert to in std::vector::operator[]() ).
|
I'm not sure if this is really relevant for this issue, but I realized a |
By the way, from the trace
corresponds to the non- cmssw/DataFormats/Common/interface/DetSetNew.h Lines 90 to 93 in 87f3f24
The I noticed |
Hmh, I tried to investigate locally in CMSSW_15_0_UBSAN_X_2024-12-09-2300, but
(even after |
Apparently those workflows require |
I was able to reproduce the warning locally on 1 thread. |
The warning in |
Here is a unit-test-like reproducer of the warning (with void TestDetSet::fillParEmpty() {
auto pg = std::make_shared<Getter>(this);
DSTV detsets(pg, std::vector<unsigned>{21,22}, 2);
CPPUNIT_ASSERT(detsets.size() == 2);
auto idetset = detsets.begin();
CPPUNIT_ASSERT(idetset != detsets.end());
CPPUNIT_ASSERT(idetset->size() == 0);
{
auto idet = idetset->begin(); // <-- UBSAN warning comes from this line
CPPUNIT_ASSERT(idet == idetset->end());
}
} and the corresponding warning
|
The "serial filling" has also a similar problem, demonstrated with void TestDetSet::fillSeqEmpty() {
DSTV detsets(2);
{
FF ff(detsets, 21, true);
}
{
FF ff(detsets, 22, true);
}
CPPUNIT_ASSERT(detsets.size() == 2);
auto idetset = detsets.begin();
CPPUNIT_ASSERT(idetset != detsets.end());
CPPUNIT_ASSERT(idetset->size() == 0);
{
auto idet = idetset->begin(); // <-- UBSAN warning comes from this line
CPPUNIT_ASSERT(idet == idetset->end());
}
} and warning
|
We have few runtime errors like [a] in UBSAN. This is triggered from https://github.com/cms-sw/cmssw/blob/master/DQM/SiStripMonitorCluster/src/SiStripMonitorCluster.cc#L847 when
cluster_detset.end()
is called. Could it be that there is nodata
https://github.com/cms-sw/cmssw/blob/master/DataFormats/Common/interface/DetSetNew.h#L57 and we returnnullptr + m_size
?@dan131riley , does this method https://github.com/cms-sw/cmssw/blob/master/DataFormats/Common/interface/DetSetNew.h#L84-L88
make any sense? shouldn't it be
if (!isValid() || empty())
?[a] https://cmssdt.cern.ch/SDT/cgi-bin/logreader/el8_amd64_gcc12/CMSSW_15_0_UBSAN_X_2024-12-09-2300/pyRelValMatrixLogs/run/2024.003001_RunDisplacedJet2024B_10k/step3_RunDisplacedJet2024B_10k.log#/
The text was updated successfully, but these errors were encountered: