-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Use constexpr in CondDB query building #48279
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
Conversation
|
please test |
|
cms-bot internal usage |
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48279/45118 |
|
A new Pull Request was created by @Dr15Jones for master. It involves the following packages:
@atpathak, @francescobrivio, @perrotta can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
|
-1 Failed Tests: ClangBuild Clang BuildI found compilation warning while trying to compile with clang. Command used: See details on the summary page. |
c813f2d to
f0a01d9
Compare
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48279/45119 |
|
please test |
|
Pull request #48279 was updated. @atpathak, @francescobrivio, @perrotta can you please check and sign again. |
|
+1 Size: This PR adds an extra 28KB to repository Comparison SummarySummary:
|
| for (int i = 0; i < M; ++i) { | ||
| ret[i + N + 1] = m[i]; | ||
| } | ||
| return ret; |
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.
The location ret[N+M+1] remains empty: is t wanted?
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.
The line std::array<char, N + M + 2> ret = {}; initializes all values to 0. In fact, the rules for consteval is no variable is allowed to have any values uninitialized and the compilers are required to enforce that.
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.
Thank you @Dr15Jones . My question was rather: did you forget to fill with something different than 0 the last char? Or maybe the array was over-dimensioned with M+N+2 elements? Or maybe it is just wanted to stay as such...
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.
All the arrays should be the size of the copied strings + 1 where the last element is a null termination. The compile time unit tests check that. That keeps with the standard C string behavior (even though I could explicitly tell the std::string_view how many characters it should use).
|
please test for el8_amd64_gcc13 though link might fail for other packages which failed in IB but at least this will check if build passes for |
|
-1 Failed Tests: Build BuildI found compilation error when building: >> Compiling src/CondCore/CondDB/test/testConnectionPool.cpp /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/gcc/13.4.0-6908cfdf803923e783448096ca4f0923/bin/c++ -c -DCMS_MICRO_ARCH='x86-64-v3' -DGNU_GCC -D_GNU_SOURCE -DTBB_USE_GLIBCXX_VERSION=130400 -DTBB_SUPPRESS_DEPRECATED_MESSAGES -DTBB_PREVIEW_RESUMABLE_TASKS=1 -DTBB_PREVIEW_TASK_GROUP_EXTENSIONS=1 -DBOOST_SPIRIT_THREADSAFE -DPHOENIX_THREADSAFE -DBOOST_MATH_DISABLE_STD_FPCLASSIFY -DBOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX -DBOOST_MPL_IGNORE_PARENTHESES_WARNING -DCMSSW_GIT_HASH='CMSSW_15_1_X_2025-06-09-2300' -DPROJECT_NAME='CMSSW' -DPROJECT_VERSION='CMSSW_15_1_X_2025-06-09-2300' -Isrc -Ipoison -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/cms/cmssw/CMSSW_15_1_X_2025-06-09-2300/src -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/cms/coral/CORAL_2_3_21-6a983813b127fd440267ce4ce3baafc2/include/LCG -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/pcre/8.43-6d98fda3bfd074ebb583e2d6a2c75d25/include -isystem/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/boost/1.80.0-7c95322172bddd4f4d4058d88084276a/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/bz2lib/1.0.6-d113e1c6278c07eeaff5f84db9548446/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/curl/7.79.0-f85273a965f53d4e6abeddf7ccaef037/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/libuuid/2.34-5ba7a8abfc0c5fecdc448cca360c25ff/include -isystem/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/lcg/root/6.32.13-a9161cdd951cd04d5ef75d13f5e82876/include -isystem/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/tbb/v2022.0.0-aac0791036768f03d11d4da28c986f66/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/xerces-c/3.1.3-ab719034dc2061fa61b09353203a0c2d/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/xz/5.6.4-b9c4ffbc390ed320a5d57fd552e29a05/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/zlib/1.2.13-589f6bb51bbeba38a7adf5a10ea8a093/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/fmt/10.2.1-31d67b0504b4ba2262f03d3c5cad83c1/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/md5/1.0.0-26057075013e190e56dad37d35219376/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/tinyxml2/6.2.0-67924ead96ecb4e69aad321b767979a5/include -O3 -pthread -pipe -Werror=main -Werror=pointer-arith -Werror=overlength-strings -Wno-vla -Werror=overflow -std=c++20 -ftree-vectorize -Werror=array-bounds -Werror=format-contains-nul -Werror=type-limits -fvisibility-inlines-hidden -fno-math-errno --param vect-max-version-for-alias-checks=50 -Xassembler --compress-debug-sections -fuse-ld=bfd -march=x86-64-v3 -felide-constructors -fmessage-length=0 -Wall -Wno-non-template-friend -Wno-long-long -Wreturn-type -Wextra -Wpessimizing-move -Wclass-memaccess -Wno-cast-function-type -Wno-unused-but-set-parameter -Wno-ignored-qualifiers -Wno-unused-parameter -Wunused -Wparentheses -Werror=return-type -Werror=missing-braces -Werror=unused-value -Werror=unused-label -Werror=address -Werror=format -Werror=sign-compare -Werror=write-strings -Werror=delete-non-virtual-dtor -Werror=strict-aliasing -Werror=narrowing -Werror=unused-but-set-variable -Werror=reorder -Werror=unused-variable -Werror=conversion-null -Werror=return-local-addr -Wnon-virtual-dtor -Werror=switch -fdiagnostics-show-option -Wno-unused-local-typedefs -Wno-attributes -Wno-psabi -Wno-error=unused-variable -DBOOST_DISABLE_ASSERTS -flto=auto -fipa-icf -flto-odr-type-merging -fno-fat-lto-objects -Wodr -fPIC -MMD -MF tmp/el8_amd64_gcc13/src/CondCore/CondDB/test/testConnectionPool/testConnectionPool.cpp.d src/CondCore/CondDB/test/testConnectionPool.cpp -o tmp/el8_amd64_gcc13/src/CondCore/CondDB/test/testConnectionPool/testConnectionPool.cpp.o >> Building binary testConnectionPool /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/gcc/13.4.0-6908cfdf803923e783448096ca4f0923/bin/c++ -O3 -pthread -pipe -Werror=main -Werror=pointer-arith -Werror=overlength-strings -Wno-vla -Werror=overflow -std=c++20 -ftree-vectorize -Werror=array-bounds -Werror=format-contains-nul -Werror=type-limits -fvisibility-inlines-hidden -fno-math-errno --param vect-max-version-for-alias-checks=50 -Xassembler --compress-debug-sections -fuse-ld=bfd -march=x86-64-v3 -felide-constructors -fmessage-length=0 -Wall -Wno-non-template-friend -Wno-long-long -Wreturn-type -Wextra -Wpessimizing-move -Wclass-memaccess -Wno-cast-function-type -Wno-unused-but-set-parameter -Wno-ignored-qualifiers -Wno-unused-parameter -Wunused -Wparentheses -Werror=return-type -Werror=missing-braces -Werror=unused-value -Werror=unused-label -Werror=address -Werror=format -Werror=sign-compare -Werror=write-strings -Werror=delete-non-virtual-dtor -Werror=strict-aliasing -Werror=narrowing -Werror=unused-but-set-variable -Werror=reorder -Werror=unused-variable -Werror=conversion-null -Werror=return-local-addr -Wnon-virtual-dtor -Werror=switch -fdiagnostics-show-option -Wno-unused-local-typedefs -Wno-attributes -Wno-psabi -Wno-error=unused-variable -DBOOST_DISABLE_ASSERTS -flto=auto -fipa-icf -flto-odr-type-merging -fno-fat-lto-objects -Wodr -fPIC tmp/el8_amd64_gcc13/src/CondCore/CondDB/test/testConnectionPool/testConnectionPool.cpp.o -Wl,-E -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,noexecstack -L/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_15_1_X_2025-06-09-2300/biglib/el8_amd64_gcc13 -L/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_15_1_X_2025-06-09-2300/lib/el8_amd64_gcc13 -L/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/cms/cmssw/CMSSW_15_1_X_2025-06-09-2300/biglib/el8_amd64_gcc13 -L/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/cms/cmssw/CMSSW_15_1_X_2025-06-09-2300/lib/el8_amd64_gcc13 -L/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/cms/cmssw/CMSSW_15_1_X_2025-06-09-2300/external/el8_amd64_gcc13/lib -L/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_15_1_X_2025-06-09-2300/static/el8_amd64_gcc13 -L/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/cms/cmssw/CMSSW_15_1_X_2025-06-09-2300/static/el8_amd64_gcc13 -lCondFormatsRunInfo -lCondCoreCondDB -lFWCoreFramework -lCondFormatsCommon -lFWCoreCommon -lFWCoreServiceRegistry -lDataFormatsCommon -lFWCoreParameterSet -lFWCoreAbstractServices -lFWCoreMessageLogger -lDataFormatsProvenance -lFWCoreConcurrency -lFWCorePluginManager -lFWCoreReflection -lCondFormatsSerialization -lFWCoreUtilities -lFWCoreVersion -lUtilitiesOpenSSL -llcg_CoralCommon -llcg_RelationalAccess -llcg_CoralKernel -llcg_CoralBase -lTree -lNet -lThread -lboost_filesystem -lMathCore -lRIO -lboost_program_options -lboost_serialization -lboost_system -lCore -lboost_thread -lboost_date_time -lpcre -lbz2 -lcurl -luuid -ltbb -lxerces-c -llzma -lz -lfmt -lcms-md5 -lssl -lcrypto -lcrypt -ldl -lrt -lstdc++fs -ltinyxml2 -o tmp/el8_amd64_gcc13/src/CondCore/CondDB/test/testConnectionPool/testConnectionPool /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/gcc/13.4.0-6908cfdf803923e783448096ca4f0923/bin/../lib/gcc/x86_64-redhat-linux-gnu/13.4.0/../../../../x86_64-redhat-linux-gnu/bin/ld.bfd: cannot find -lCondFormatsRunInfo: No such file or directory collect2: error: ld returned 1 exit status >> Deleted: tmp/el8_amd64_gcc13/src/CondCore/CondDB/test/testConnectionPool/testConnectionPool gmake: *** [tmp/el8_amd64_gcc13/src/CondCore/CondDB/test/testConnectionPool/testConnectionPool] Error 1 >> Compiling src/CondCore/CondDB/test/testFrontier.cpp /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/gcc/13.4.0-6908cfdf803923e783448096ca4f0923/bin/c++ -c -DCMS_MICRO_ARCH='x86-64-v3' -DGNU_GCC -D_GNU_SOURCE -DTBB_USE_GLIBCXX_VERSION=130400 -DTBB_SUPPRESS_DEPRECATED_MESSAGES -DTBB_PREVIEW_RESUMABLE_TASKS=1 -DTBB_PREVIEW_TASK_GROUP_EXTENSIONS=1 -DBOOST_SPIRIT_THREADSAFE -DPHOENIX_THREADSAFE -DBOOST_MATH_DISABLE_STD_FPCLASSIFY -DBOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX -DBOOST_MPL_IGNORE_PARENTHESES_WARNING -DCMSSW_GIT_HASH='CMSSW_15_1_X_2025-06-09-2300' -DPROJECT_NAME='CMSSW' -DPROJECT_VERSION='CMSSW_15_1_X_2025-06-09-2300' -Isrc -Ipoison -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/cms/cmssw/CMSSW_15_1_X_2025-06-09-2300/src -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/cms/coral/CORAL_2_3_21-6a983813b127fd440267ce4ce3baafc2/include/LCG -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/pcre/8.43-6d98fda3bfd074ebb583e2d6a2c75d25/include -isystem/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/boost/1.80.0-7c95322172bddd4f4d4058d88084276a/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/bz2lib/1.0.6-d113e1c6278c07eeaff5f84db9548446/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/curl/7.79.0-f85273a965f53d4e6abeddf7ccaef037/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/libuuid/2.34-5ba7a8abfc0c5fecdc448cca360c25ff/include -isystem/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/lcg/root/6.32.13-a9161cdd951cd04d5ef75d13f5e82876/include -isystem/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/tbb/v2022.0.0-aac0791036768f03d11d4da28c986f66/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/xerces-c/3.1.3-ab719034dc2061fa61b09353203a0c2d/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/xz/5.6.4-b9c4ffbc390ed320a5d57fd552e29a05/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/zlib/1.2.13-589f6bb51bbeba38a7adf5a10ea8a093/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/fmt/10.2.1-31d67b0504b4ba2262f03d3c5cad83c1/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/md5/1.0.0-26057075013e190e56dad37d35219376/include -I/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02893/el8_amd64_gcc13/external/tinyxml2/6.2.0-67924ead96ecb4e69aad321b767979a5/include -O3 -pthread -pipe -Werror=main -Werror=pointer-arith -Werror=overlength-strings -Wno-vla -Werror=overflow -std=c++20 -ftree-vectorize -Werror=array-bounds -Werror=format-contains-nul -Werror=type-limits -fvisibility-inlines-hidden -fno-math-errno --param vect-max-version-for-alias-checks=50 -Xassembler --compress-debug-sections -fuse-ld=bfd -march=x86-64-v3 -felide-constructors -fmessage-length=0 -Wall -Wno-non-template-friend -Wno-long-long -Wreturn-type -Wextra -Wpessimizing-move -Wclass-memaccess -Wno-cast-function-type -Wno-unused-but-set-parameter -Wno-ignored-qualifiers -Wno-unused-parameter -Wunused -Wparentheses -Werror=return-type -Werror=missing-braces -Werror=unused-value -Werror=unused-label -Werror=address -Werror=format -Werror=sign-compare -Werror=write-strings -Werror=delete-non-virtual-dtor -Werror=strict-aliasing -Werror=narrowing -Werror=unused-but-set-variable -Werror=reorder -Werror=unused-variable -Werror=conversion-null -Werror=return-local-addr -Wnon-virtual-dtor -Werror=switch -fdiagnostics-show-option -Wno-unused-local-typedefs -Wno-attributes -Wno-psabi -Wno-error=unused-variable -DBOOST_DISABLE_ASSERTS -flto=auto -fipa-icf -flto-odr-type-merging -fno-fat-lto-objects -Wodr -fPIC -MMD -MF tmp/el8_amd64_gcc13/src/CondCore/CondDB/test/testFrontier/testFrontier.cpp.d src/CondCore/CondDB/test/testFrontier.cpp -o tmp/el8_amd64_gcc13/src/CondCore/CondDB/test/testFrontier/testFrontier.cpp.o >> Building binary testFrontier |
|
please test for el8_amd64_gcc13 using addpkg CondFormats/RunInfo |
|
gcc13 build issues are fixed now https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-eba36c/46651/build-logs/ |
Though I was inspired to look at this code because of the gcc13 problem, I didn't actually make the change to fix it (although it is a nice bonus). I'm pretty sure the original gcc13 problem are indicative of a compiler bug. |
|
it might be gcc bug . We recently update GCC 13 to 13.4.0 but the PR tests for that update did not show any build errors . |
OK the gcc 13.4.0 PR tests did not fail as it only built the |
|
+db |
|
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @antoniovilela, @rappoccio, @sextonkennedy, @mandrenguyen (and backports should be raised in the release meeting by the corresponding L2) |
|
+1 |
PR description:
Made various strings compile time constructions rather than runtime.
This was uncovered while looking at gcc 13 compiler failures.
PR validation:
Code compiles. Compile time tests pass.
resolves cms-sw/framework-team#1426