Skip to content

Commit

Permalink
Merge pull request #2886 from terrelln/issue-2865
Browse files Browse the repository at this point in the history
[test] Test that the exec-stack bit isn't set on libzstd.so
  • Loading branch information
terrelln authored Dec 1, 2021
2 parents 8f9f644 + 360c263 commit e34e58b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/dev-short-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,19 @@ jobs:
make -C zlibWrapper test
make -C zlibWrapper valgrindTest
lz4-threadpool-partial-libs:
lz4-threadpool-libs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: LZ4, thread pool, and partial libs testslib wrapper test
- name: LZ4, thread pool, and libs build testslib wrapper test
run: |
make lz4install
make -C tests test-lz4
make check < /dev/null | tee # mess with lz4 console detection
make clean
make -C tests test-pool
make clean
bash tests/libzstd_partial_builds.sh
bash tests/libzstd_builds.sh
gcc-make-tests-32bit:
runs-on: ubuntu-latest
Expand Down
9 changes: 7 additions & 2 deletions tests/libzstd_partial_builds.sh → tests/libzstd_builds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,19 @@ mustBeAbsent() {

# default compilation : all features enabled - no zbuff
$ECHO "testing default library compilation"
CFLAGS= make -C $DIR/../lib libzstd.a > $INTOVOID
CFLAGS= make -C $DIR/../lib libzstd libzstd.a > $INTOVOID
nm $DIR/../lib/libzstd.a | $GREP "\.o" > tmplog
isPresent "zstd_compress.o"
isPresent "zstd_decompress.o"
isPresent "zdict.o"
isPresent "zstd_v07.o"
mustBeAbsent "zbuff_compress.o"
$RM $DIR/../lib/libzstd.a tmplog
$RM tmplog

# Check that the exec-stack bit isn't set
readelf -lW $DIR/../lib/libzstd.so | $GREP "GNU_STACK" > tmplog
mustBeAbsent "RWE"
$RM $DIR/../lib/libzstd.a $DIR/../lib/libzstd.so* tmplog

# compression disabled => also disable zdict
$ECHO "testing with compression disabled"
Expand Down

0 comments on commit e34e58b

Please sign in to comment.