Skip to content

Commit c4fa2ac

Browse files
committed
Enable stack protection (CI release executables)
1 parent fd0d475 commit c4fa2ac

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,16 @@ jobs:
9292
--disable-valgrind \
9393
--with-oniguruma=builtin \
9494
--enable-static \
95-
--enable-all-static
95+
--enable-all-static \
96+
CFLAGS="-O2 -pthread -fstack-protector-all"
9697
make -j"$(nproc)"
9798
file ./jq
9899
cp ./jq jq-${{ env.SUFFIX }}
99100
- name: Test
100101
# Only run tests for amd64 matching the CI machine arch
101102
if: ${{ matrix.arch == 'amd64' }}
102103
run: |
104+
nm jq | grep __stack_chk_fail
103105
make check VERBOSE=yes
104106
git diff --exit-code
105107
- name: Upload Test Logs
@@ -157,7 +159,8 @@ jobs:
157159
--disable-valgrind \
158160
--with-oniguruma=builtin \
159161
--enable-static \
160-
--enable-all-static
162+
--enable-all-static \
163+
CFLAGS="-O2 -pthread -fstack-protector-all"
161164
make -j"$(nproc)"
162165
strip ./jq
163166
file ./jq
@@ -234,9 +237,11 @@ jobs:
234237
--with-oniguruma=builtin \
235238
--disable-shared \
236239
--enable-static \
237-
--enable-all-static
240+
--enable-all-static \
241+
CFLAGS="-O2 -pthread -fstack-protector-all"
238242
make -j$(nproc)
239243
file ./jq.exe
244+
nm ./jq.exe | grep __stack_chk_fail
240245
cp ./jq.exe jq-${{ env.SUFFIX }}.exe
241246
- name: Test
242247
# Only run tests for amd64 matching the CI machine arch

0 commit comments

Comments
 (0)