Out-of-bounds vector access in roofit test
ellert opened this issue · comments
Check duplicate issues.
- Checked for duplicates
Description
Running the test suite for ROOT 6.32.00 fais in gtest-roofit-roofitcore-test-testLikelihoodJob:
[==========] Running 45 tests from 4 test suites.
[----------] Global test environment set-up.
[----------] 9 tests from LikelihoodJobTest
[ RUN ] LikelihoodJobTest.UnbinnedGaussian1D
[ OK ] LikelihoodJobTest.UnbinnedGaussian1D (368 ms)
[ RUN ] LikelihoodJobTest.UnbinnedGaussian1DSelectedParameterValues
[ OK ] LikelihoodJobTest.UnbinnedGaussian1DSelectedParameterValues (233 ms)
[ RUN ] LikelihoodJobTest.UnbinnedGaussian1DTwice
[ OK ] LikelihoodJobTest.UnbinnedGaussian1DTwice (219 ms)
[ RUN ] LikelihoodJobTest.UnbinnedGaussianND
[ OK ] LikelihoodJobTest.UnbinnedGaussianND (331 ms)
[ RUN ] LikelihoodJobTest.SimBinned
[ OK ] LikelihoodJobTest.SimBinned (323 ms)
[ RUN ] LikelihoodJobTest.BinnedConstrained
[ OK ] LikelihoodJobTest.BinnedConstrained (311 ms)
[ RUN ] LikelihoodJobTest.SimUnbinned
[ OK ] LikelihoodJobTest.SimUnbinned (281 ms)
[ RUN ] LikelihoodJobTest.SimUnbinnedNonExtended
[ OK ] LikelihoodJobTest.SimUnbinnedNonExtended (264 ms)
[ RUN ] LikelihoodJobTest.BatchedUnbinnedGaussianND
[ OK ] LikelihoodJobTest.BatchedUnbinnedGaussianND (362 ms)
[----------] 9 tests from LikelihoodJobTest (2698 ms total)
[----------] 2 tests from LikelihoodJobBinnedDatasetTest
[ RUN ] LikelihoodJobBinnedDatasetTest.UnbinnedPdf
[ OK ] LikelihoodJobBinnedDatasetTest.UnbinnedPdf (152 ms)
[ RUN ] LikelihoodJobBinnedDatasetTest.BinnedNLL
[ OK ] LikelihoodJobBinnedDatasetTest.BinnedNLL (325 ms)
[----------] 2 tests from LikelihoodJobBinnedDatasetTest (480 ms total)
[----------] 2 tests from LikelihoodJobSimBinnedConstrainedTest
[ RUN ] LikelihoodJobSimBinnedConstrainedTest.BasicParameters
[ OK ] LikelihoodJobSimBinnedConstrainedTest.BasicParameters (452 ms)
[ RUN ] LikelihoodJobSimBinnedConstrainedTest.ConstrainedAndOffset
/usr/include/c++/14/bits/stl_vector.h:1130: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = ROOT::Math::KahanSum<double>; _Alloc = std::allocator<ROOT::Math::KahanSum<double> >; reference = ROOT::Math::KahanSum<double>&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
The test hangs at this point, and is eventually killed by the timeout limit.
Reproducer
Compile ROOT with -Wp,-D_GLIBCXX_ASSERTIONS
in CXXFLAGS. This is part of the default flags for Fedora package builds.
ROOT version
6.32.00
Installation method
Package build on Fedora from source
Operating system
Fedora Linux
Additional context
No response
Could you try "replace all" unsigned int --> unsigned long in Math/Util.h to see if that changes things?
Otherwise, the problem might be when N=0
No need to look into this, I already know the fix. PR will follow
Hi @guitargeek,
It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.
Sincerely,
🤖