Skip to content

Commit 91f6b19

Browse files
committed
Merge branch 'master'
2 parents 63e7f75 + 4014233 commit 91f6b19

104 files changed

Lines changed: 6560 additions & 478 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.asf.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,11 @@ github:
22
homepage: https://datasketches.apache.org
33
ghp_branch: gh-pages
44
ghp_path: /docs
5+
6+
protected_branches:
7+
master:
8+
required_pull_request_reviews:
9+
dismiss_stale_reviews: false
10+
required_approving_review_count: 1
11+
required_signatures: false
12+
required_conversation_resolution: false

.clang-tidy

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
---
18+
Checks: |
19+
clang-diagnostic-*,
20+
clang-analyzer-*,
21+
-clang-analyzer-alpha*,
22+
google-*,
23+
modernize-*,
24+
-modernize-avoid-c-arrays,
25+
-modernize-use-trailing-return-type,
26+
-modernize-use-nodiscard,
27+
28+
CheckOptions:
29+
- key: google-readability-braces-around-statements.ShortStatementLines
30+
value: '0'
31+
- key: google-readability-function-size.StatementThreshold
32+
value: '800'
33+
- key: google-readability-namespace-comments.ShortNamespaceLines
34+
value: '10'
35+
- key: google-readability-namespace-comments.SpacesBeforeComments
36+
value: '2'

.gitattributes

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Override 'core.autocrlf' while still using Git's built-in heuristics to detect text vs binary.
2+
# Normalize all text files to LF line endings on checkout.
3+
* text=auto eol=lf
4+
5+
# Explicitly declare text files that should always be LF
6+
.asf.yaml text eol=lf
7+
.gitattributes text eol=lf
8+
.gitignore text eol=lf
9+
LICENSE text eol=lf
10+
NOTICE text eol=lf
11+
*.html text eol=lf
12+
*.hpp text eol=lf
13+
*.cpp text eol=lf
14+
*.sk text eol=lf
15+
*.md text eol=lf
16+
*.properties text eol=lf
17+
*.sh text eol=lf
18+
*.xml text eol=lf
19+
*.yml text eol=lf
20+
*.yaml text eol=lf
21+
*.txt text eol=lf
22+
23+
24+
# Declare files that will always have CRLF line endings on checkout.
25+
# Windows batch scripts strictly require CRLF
26+
*.bat text eol=crlf
27+
*.cmd text eol=crlf
28+
29+
# Explicitly denote all files that are truly binary and should not be modified.
30+
*.jpg binary
31+
*.png binary
32+
*.svg binary
33+
34+
# Declare files that should be ignored when creating an archive of the git repository
35+
.asf.yaml export-ignore
36+
.gitattributes export-ignore
37+
.gitignore export-ignore
38+
.github/ export-ignore

.github/workflows/build_cmake.yml

Lines changed: 166 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,24 @@ env:
66
BUILD_TYPE: Release
77

88
jobs:
9-
build:
9+
build-native:
1010
name: ${{ matrix.config.name }}
1111
runs-on: ${{ matrix.config.os }}
1212
strategy:
1313
fail-fast: false
1414
matrix:
1515
config:
1616
- {
17-
name: "MacOS Latest, Clang",
18-
os: macos-latest,
17+
name: "macOS 15, Clang",
18+
os: macos-15,
1919
test_target: test,
2020
cc: "clang", cxx: "clang++"
2121
}
2222
- {
23-
name: "Ubuntu Latest, GCC",
24-
os: ubuntu-latest,
25-
test_target: test,
26-
cc: "gcc", cxx: "g++"
27-
}
28-
- {
29-
name: "Windows Latest, MSVC",
30-
os: windows-latest,
23+
name: "Windows 2025, MSVC",
24+
os: windows-2025,
3125
test_target: RUN_TESTS,
32-
cc: "cl", cxx: "cl",
33-
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
26+
cc: "cl", cxx: "cl"
3427
}
3528
#- {
3629
# name: "Windows Latest, MinGW+gcc",
@@ -40,7 +33,7 @@ jobs:
4033

4134
steps:
4235
- name: Checkout
43-
uses: actions/checkout@v3
36+
uses: actions/checkout@v4
4437
with:
4538
submodules: true
4639
persist-credentials: false
@@ -52,3 +45,162 @@ jobs:
5245
run: cmake --build build --config Release --target ${{ matrix.config.test_target }}
5346
- name: Install headers
5447
run: cmake --build build -t install
48+
49+
build-ubuntu-gcc:
50+
name: Compiler / ${{ matrix.config.name }}
51+
runs-on: ubuntu-24.04
52+
container:
53+
image: ${{ matrix.config.image }}
54+
defaults:
55+
run:
56+
shell: bash
57+
strategy:
58+
fail-fast: false
59+
matrix:
60+
config:
61+
- {
62+
name: "Ubuntu 24.04, GCC 9",
63+
image: "ubuntu:24.04",
64+
test_target: test,
65+
cc: "gcc-9", cxx: "g++-9",
66+
packages: "gcc-9 g++-9",
67+
cxx_standard: "11"
68+
}
69+
- {
70+
name: "Ubuntu 24.04, GCC 10",
71+
image: "ubuntu:24.04",
72+
test_target: test,
73+
cc: "gcc-10", cxx: "g++-10",
74+
packages: "gcc-10 g++-10",
75+
cxx_standard: "11"
76+
}
77+
- {
78+
name: "Ubuntu 24.04, GCC 11",
79+
image: "ubuntu:24.04",
80+
test_target: test,
81+
cc: "gcc-11", cxx: "g++-11",
82+
packages: "gcc-11 g++-11",
83+
cxx_standard: "11"
84+
}
85+
- {
86+
name: "Ubuntu 24.04, GCC 12",
87+
image: "ubuntu:24.04",
88+
test_target: test,
89+
cc: "gcc-12", cxx: "g++-12",
90+
packages: "gcc-12 g++-12",
91+
cxx_standard: "11"
92+
}
93+
- {
94+
name: "Ubuntu 24.04, GCC 13",
95+
image: "ubuntu:24.04",
96+
test_target: test,
97+
cc: "gcc-13", cxx: "g++-13",
98+
packages: "gcc-13 g++-13",
99+
cxx_standard: "11"
100+
}
101+
- {
102+
name: "Ubuntu 24.04, GCC 14",
103+
image: "ubuntu:24.04",
104+
test_target: test,
105+
cc: "gcc-14", cxx: "g++-14",
106+
packages: "gcc-14 g++-14",
107+
cxx_standard: "11"
108+
}
109+
- {
110+
name: "Ubuntu 25.10, GCC 15",
111+
image: "ubuntu:25.10",
112+
test_target: test,
113+
cc: "gcc-15", cxx: "g++-15",
114+
packages: "gcc-15 g++-15",
115+
cxx_standard: "11"
116+
}
117+
steps:
118+
- name: Install build dependencies
119+
env:
120+
DEBIAN_FRONTEND: noninteractive
121+
run: |
122+
apt-get update
123+
apt-get install -y --no-install-recommends \
124+
ca-certificates \
125+
cmake \
126+
git \
127+
make \
128+
${{ matrix.config.packages }}
129+
- name: Checkout
130+
uses: actions/checkout@v4
131+
with:
132+
submodules: true
133+
persist-credentials: false
134+
- name: Configure
135+
env:
136+
CC: ${{ matrix.config.cc }}
137+
CXX: ${{ matrix.config.cxx }}
138+
run: cmake -B build -S . -DCMAKE_CXX_STANDARD=${{ matrix.config.cxx_standard }} -DCMAKE_INSTALL_PREFIX=./install_test
139+
- name: Build C++ unit tests
140+
run: cmake --build build --config Release
141+
- name: Run C++ tests
142+
run: cmake --build build --config Release --target ${{ matrix.config.test_target }}
143+
- name: Install headers
144+
run: cmake --build build -t install
145+
146+
build-ubuntu-std:
147+
name: Standard / Ubuntu 25.10, GCC 15, C++${{ matrix.config.cxx_standard }}
148+
runs-on: ubuntu-24.04
149+
container:
150+
image: ubuntu:25.10
151+
defaults:
152+
run:
153+
shell: bash
154+
strategy:
155+
fail-fast: false
156+
matrix:
157+
config:
158+
- {
159+
cxx_standard: "11",
160+
test_target: test
161+
}
162+
- {
163+
cxx_standard: "14",
164+
test_target: test
165+
}
166+
- {
167+
cxx_standard: "17",
168+
test_target: test
169+
}
170+
- {
171+
cxx_standard: "20",
172+
test_target: test
173+
}
174+
- {
175+
cxx_standard: "23",
176+
test_target: test,
177+
}
178+
steps:
179+
- name: Install build dependencies
180+
env:
181+
DEBIAN_FRONTEND: noninteractive
182+
run: |
183+
apt-get update
184+
apt-get install -y --no-install-recommends \
185+
ca-certificates \
186+
cmake \
187+
gcc-15 \
188+
g++-15 \
189+
git \
190+
make
191+
- name: Checkout
192+
uses: actions/checkout@v4
193+
with:
194+
submodules: true
195+
persist-credentials: false
196+
- name: Configure
197+
env:
198+
CC: gcc-15
199+
CXX: g++-15
200+
run: cmake -B build -S . -DCMAKE_CXX_STANDARD=${{ matrix.config.cxx_standard }} -DCMAKE_INSTALL_PREFIX=./install_test
201+
- name: Build C++ unit tests
202+
run: cmake --build build --config Release
203+
- name: Run C++ tests
204+
run: cmake --build build --config Release --target ${{ matrix.config.test_target }}
205+
- name: Install headers
206+
run: cmake --build build -t install

.github/workflows/code_coverage.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020
with:
2121
submodules: true
2222
persist-credentials: false
@@ -37,7 +37,8 @@ jobs:
3737
- name: Generate coverage .info
3838
run: cmake --build build --target coverage_report
3939
- name: Post to Coveralls
40-
uses: coverallsapp/github-action@master
41-
with:
42-
github-token: ${{ secrets.GITHUB_TOKEN }}
43-
path-to-lcov: build/lcov.info
40+
run: |
41+
curl -sL https://coveralls.io/coveralls-linux.tar.gz | tar -xz
42+
./coveralls report build/lcov.info
43+
env:
44+
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/doxygen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515
- name: Install doxygen
1616
run: sudo apt install doxygen -y
1717
- name: Run Doxygen

.github/workflows/hardening.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: libc++ Hardening Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
workflow_dispatch:
11+
12+
env:
13+
BUILD_TYPE: Debug
14+
15+
jobs:
16+
hardening-test:
17+
name: C++17 with libc++ Hardening Mode
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
submodules: true
25+
persist-credentials: false
26+
27+
- name: Install LLVM and libc++
28+
run: |
29+
# Install LLVM/Clang with libc++
30+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
31+
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main"
32+
sudo apt-get update
33+
sudo apt-get install -y clang-18 libc++-18-dev libc++abi-18-dev
34+
35+
- name: Configure with C++17 and libc++ hardening
36+
env:
37+
CC: clang-18
38+
CXX: clang++-18
39+
run: |
40+
cmake -B build -S . \
41+
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
42+
-DCMAKE_CXX_STANDARD=17 \
43+
-DBUILD_TESTS=ON \
44+
-DCMAKE_CXX_FLAGS="-stdlib=libc++ -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG" \
45+
-DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++ -lc++abi"
46+
47+
- name: Build hardening tests
48+
run: cmake --build build --target hardening_test --config ${{ env.BUILD_TYPE }}
49+
50+
- name: Run hardening tests
51+
run: |
52+
cd build
53+
./common/test/hardening_test "[deserialize_hardening]"
54+
55+
- name: Report results
56+
if: always()
57+
run: |
58+
echo "✅ Tests passed with libc++ hardening enabled!"
59+
echo "This verifies the fix for issue #477 prevents SIGABRT."

.github/workflows/sanitize.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020
with:
2121
submodules: true
2222
persist-credentials: false

0 commit comments

Comments
 (0)