This is an automated email from the ASF dual-hosted git repository.
airborne12 pushed a commit to branch clucene-3.1
in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git
The following commit(s) were added to refs/heads/clucene-3.1 by this push:
new d8ca7581015 branch-3.1: [fix](ci) Fix the macOS unit test job (#427)
d8ca7581015 is described below
commit d8ca75810153484b334951d66ff5e44415c5fbfa
Author: Jack <[email protected]>
AuthorDate: Fri Oct 23 17:38:00 2026 +0800
branch-3.1: [fix](ci) Fix the macOS unit test job (#427)
* [fix](ci) Fix the macOS unit test job
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary:
The macOS jobs of the CI of clucene-3.1 do not pass, independent of the
code that is changed:
- The macOS unit test job runs on `macos-12`, a runner image that GitHub
has retired, so the job stays queued forever. It now uses `macos-15`, like the
macOS build job and the other branches.
- `TestStandard95.cpp` defines a global `std::vector<std::string> tokens`
and `TestTermVectorsReader.cpp` another one of a different type. With libstdc++
the type of the first one is part of the symbol name (`tokens[abi:cxx11]`),
with libc++ both are just `_tokens`, so on macOS cl_test fails to link with
"duplicate symbol '_tokens'". The first one is made `static`.
### Release note
None
### Check List (For Author)
- Test: No need to test (CI configuration and test code only)
- Not run on macOS (not available here); cl_test builds and passes on
Linux with g++ and clang.
- Behavior changed: No
- Does this need documentation: No
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* [fix](ci) Do not report container overflows in the macOS unit test job
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary:
cl_test is the only part that is built with AddressSanitizer, the libraries
are not. The libc++ of macOS annotates std::vector for ASAN, and the
annotations are not kept up to date by the code that is not instrumented, so
ASAN reports a container-overflow in `SegmentInfo::files()` (a vector of
strings that grows) and aborts the unit test at TestMultiSetValueField. It is
the false positive that ASAN describes in its hint; libstdc++ does not annotate
vectors, so Linux is not affected. T [...]
### Release note
None
### Check List (For Author)
- Test: No need to test (CI configuration only; the macOS job is the test)
- Behavior changed: No
- Does this need documentation: No
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
---------
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
---
.github/workflows/clucene-ut.yml | 5 +++--
src/test/analysis/TestStandard95.cpp | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/clucene-ut.yml b/.github/workflows/clucene-ut.yml
index 8df140802d4..2b8fb5bc34a 100644
--- a/.github/workflows/clucene-ut.yml
+++ b/.github/workflows/clucene-ut.yml
@@ -78,7 +78,7 @@ jobs:
run_clucene_ut_macos:
name: CLucene UT (MacOS)
- runs-on: macos-12
+ runs-on: macos-15
steps:
- name: "Checkout ${{ github.event.pull_request.number }} ${{
github.event.pull_request.head.sha }}"
uses: actions/checkout@v4
@@ -115,4 +115,5 @@ jobs:
cmake ../
make cl_test
cd bin/
- ./cl_test
+ # cl_test is built with ASAN, the libraries are not: the container
annotations of libc++ give false reports
+ ASAN_OPTIONS=detect_container_overflow=0 ./cl_test
diff --git a/src/test/analysis/TestStandard95.cpp
b/src/test/analysis/TestStandard95.cpp
index 80f3ba88240..2ea7c06540f 100644
--- a/src/test/analysis/TestStandard95.cpp
+++ b/src/test/analysis/TestStandard95.cpp
@@ -470,7 +470,7 @@ std::vector<std::string> datas = {
"{\"qid\": \"qid_8325162146787472205\", \"category\": \"娱乐-博彩\", \"title\":
\"第一次发图。。。(图2)请高手进来批一下。。第一次发图。拍摄不好 \", \"desc\":
\"第一次发图。不好虽见笑```谢谢进来帮批示的朋友。。:)))\\r\", \"answer\": \"6 12场感觉挺悬的...祝好\"}"
};
-std::vector<std::string> tokens = {
+static std::vector<std::string> tokens = {
"qid|qid_1815059893214501395|category|烦|恼|恋|爱|title|请|问|深|入|骨|髓|地|喜|欢|一|个|人|怎|么|办|我|不|能|确|定|对|方|是|不|是|喜|欢|我|我|却|想|desc|我|不|能|确|定|对|方|是|不|是|喜|欢|我|我|却|想|分|分|秒|秒|跟|他|在|一|起|有|谁|能|告|诉|我|如|何|能|想|他|少|一|点|answer|一|定|要|告|诉|他|你|很|喜|欢|他|很|爱|他|虽|然|不|知|道|你|和|他|现|在|的|关|系|是|什|么|但|如|果|真|的|觉|得|很|喜|欢|就|向|他|表|白|啊|起|码|你|努|力|过|了|女|生|主|动|多|少|占|一|点|优|势|的|呵|呵|只|愿|曾|经|拥|有|到|以|后|就|算|感|情|没|现|在|这|么|强|烈|了|也|不|会|觉|得|遗|憾|啊|与|其|每|天|那|么|痛|苦|的|想|他|恋|他|还|不|如|直|接|告|诉|他|不|要|怕|回|破|坏|你|们|现|有|的|感|情|因|为|如|果|不|告|诉|他|你|可|能|回|后|
[...]
"qid|qid_2063849676113062517|category|游|戏|完|美|游|戏|诛|仙|title|我|登|陆|诛|仙|2|时|总|说|我|账|号|密|码|错|误|但|是|我|打|的|是|正|确|的|就|算|不|对|我|desc|answer|被|盗|号|了|我|的|号|在|22|号|那|天|被|盗|了|跟|你|一|样|情|况|link|密|码|与|账|号|错|误|我|密|保|都|有|了|呐|邮|箱|换|密|码|也|不|行|还|被|删|了|号|伤|心|兼|郁|闷|呵|呵|盗|号|了|建|议|跟|完|美|申|请|把|号|要|回|来|或|者|玩|新|的|号|",
"qid|qid_6625582808814915192|category|游|戏|网|络|游|戏|title|斩|魔|仙|者|称|号|怎|么|得|来|的|desc|斩|魔|仙|者|称|号|怎|么|得|来|的|answer|楼|主|您|好|以|下|为|转|载|r|r|圣|诞|前|热|身|来|生|肖|传|说|做|斩|魔|仙|者|r|r|一|年|一|度|的|圣|诞|节|快|要|来|临|了|大|街|小|巷|商|户|们|都|在|忙|着|准|备|12|月|25|日|圣|诞|的|来|临|而|这|时|候|一|些|妖|魔|也|正|蠢|蠢|欲|动|准|备|作|乱|作|为|生|肖|世|界|肩|负|维|护|世|界|和|平|拯|救|全|人|类|的|生|肖|使|者|怎|么|能|不|有|所|行|动|为|了|生|肖|世|界|的|安|定|而|做|防|范|准|备|r|r|要|让|妖|魔|鬼|怪|能|对|你|有|所|心|悸|除|了|自|己|本|身|武|艺|要|高|强|最|好|能|在|妖|魔|界|打|出|知|名|度|这|样|当|你|的|亲|朋|好|友|被|妖|魔|袭|击|时|只|要|爆|出|你|的|名|
[...]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]