Skip to content
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

Enable stack protection (CI release executables) #2801

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ jobs:
--disable-valgrind \
--with-oniguruma=builtin \
--enable-static \
--enable-all-static
--enable-all-static \
CFLAGS="-O2 -pthread -fstack-protector-all"
make -j"$(nproc)"
file ./jq
cp ./jq jq-${{ env.SUFFIX }}
Expand Down Expand Up @@ -157,7 +158,8 @@ jobs:
--disable-valgrind \
--with-oniguruma=builtin \
--enable-static \
--enable-all-static
--enable-all-static \
CFLAGS="-O2 -pthread -fstack-protector-all"
Copy link
Member

@wader wader Aug 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh i somehow assumed -fsanitize=safe-stack was clang's versions of -fstack-protector-all but seems to be two different stack protection techniques.

I still haven't managed to get -fsanitize=safe-stack to work for darwin x86, but do seems to work on linux 🤷

make -j"$(nproc)"
strip ./jq
file ./jq
Expand Down Expand Up @@ -234,7 +236,8 @@ jobs:
--with-oniguruma=builtin \
--disable-shared \
--enable-static \
--enable-all-static
--enable-all-static \
CFLAGS="-O2 -pthread -fstack-protector-all"
make -j$(nproc)
file ./jq.exe
cp ./jq.exe jq-${{ env.SUFFIX }}.exe
Expand Down