Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
19d806e
reject out-of-range numFrames in seekable seek table loader
saleemno1 Jul 29, 2026
7d777bb
Reject a too large block in ZSTD_compressSequencesAndLiterals()
nileshpatil6 Aug 21, 2026
bf7504b
tests: rename cSize in the new test to avoid shadowing
nileshpatil6 Aug 22, 2026
e6dc2fb
decompress: Remove stale Clang branch-hint comments
Sep 7, 2026
61da23a
Enforce literal buffer capacity contract
KSAGlory Sep 11, 2026
5641f82
cmake: fix CXX flag dependency in AddZstdCompilationFlags when C++ is…
Tyagiquamar Oct 1, 2026
81c4414
decompress: drop the DDict hashset on ZSTD_DCtx_reset and ZSTD_DCtx_r…
filtede98 Oct 5, 2026
e47dfb3
programs: fix zstd -l infinite loop on a large skippable frame
ilyas-mallah Oct 9, 2026
ed26f94
compress: wait for an abandoned frame's jobs before freeing what they…
Eshan05 Oct 28, 2026
c70f728
ci: run the macOS ARM64 CMake job on macos-latest
Cyan4973 Nov 7, 2026
825bfe8
Merge pull request #4904 from meta/ci-macos-arm64-runner
Cyan4973 Nov 7, 2026
b276bea
programs: apply --memory to .xz and .lzma decompression
Cyan4973 Nov 7, 2026
5633b0e
Merge pull request #4903 from meta/cli-lzma-memlimit
Cyan4973 Nov 7, 2026
399405a
Merge pull request #4717 from saleemno1/seektable-numframes-overflow
Cyan4973 Nov 8, 2026
8b985c5
Merge pull request #4833 from ilyas-mallah/cli-list-skippable-overflow
Cyan4973 Nov 8, 2026
6bdc1d3
programs: don't follow symbolic links and junctions in -r on Windows
Cyan4973 Nov 8, 2026
4b0e377
Merge pull request #4905 from meta/windows-recursive-skip-links
Cyan4973 Nov 8, 2026
f9c9c68
seekable_format: Reject offsets past the end in decompress
eyupcanakman Nov 6, 2026
75aeac4
decompress: reject output overrunning split literals and oversized bl…
terrelln Nov 5, 2026
6c93b99
seekable_format: document ZSTD_seekable_decompress() at the end of th…
Cyan4973 Nov 9, 2026
e6bd22d
Merge pull request #4902 from eyupcanakman/seekable-decompress-past-end
Cyan4973 Nov 9, 2026
cec5da4
programs: don't write the output through a symbolic link
Cyan4973 Nov 9, 2026
cc53693
Merge pull request #4906 from meta/cli-dst-no-follow
Cyan4973 Nov 9, 2026
75dd154
doc: ZSTD_DCtx_refDDict() table is freed by reset and refDDict(NULL)
Cyan4973 Nov 10, 2026
fd1f65c
tests: shorten the DDict hashset reset test
Cyan4973 Nov 10, 2026
3b8634e
Merge pull request #4792 from filtede98/fix-ddict-hashset-load-factor…
Cyan4973 Nov 10, 2026
54ade3a
compress: wait for an empty job before releasing it
Cyan4973 Nov 10, 2026
a8af53b
compress: clear jobReady when the jobs are released
Cyan4973 Nov 10, 2026
8136851
tests: shorten the abandoned multi-threaded frame test
Cyan4973 Nov 10, 2026
ad2018c
Merge pull request #4871 from Eshan05/fix-mt-abandoned-frame
Cyan4973 Nov 10, 2026
7e877d8
[zstd] Fix typo in spec
terrelln May 18, 2026
a2026f9
compress: stop using the previous pool after ZSTD_CCtx_refThreadPool()
Cyan4973 Nov 10, 2026
31db1af
compress: don't resize a thread pool provided by the application
Cyan4973 Nov 10, 2026
c2095c7
Merge pull request #4917 from meta/thread-pool-rebind
Cyan4973 Nov 10, 2026
c3e2c0d
Fix out-of-bounds read in FASTCOVER on small training samples (#4710)
eyupcanakman Nov 10, 2026
39ec354
Fix size_t underflow in COVER_ctx_init for small training sets (#4690)
rohitsux Nov 10, 2026
7bc5369
tests: shorten the too large block test
Cyan4973 Nov 10, 2026
918ade2
zstd.h: state the block size limit of ZSTD_compressSequencesAndLitera…
Cyan4973 Nov 10, 2026
ac5660c
dictBuilder: break COVER sort ties by position, not by address (#4765)
jaypatrickhoward Nov 10, 2026
35a056a
Revert "Fix size_t underflow in COVER_ctx_init for small training set…
kevinjzhang Nov 10, 2026
0113699
Fix size_t underflow in COVER_ctx_init for small training sets
rohitsux Jun 5, 2026
8fcf03f
Factor out COVER read length calculation
Nov 10, 2026
d166226
Merge branch 'dev' into fix/compress-sequences-and-literals-block-size
Cyan4973 Nov 10, 2026
4dde8bf
Fix legacy dictionary magic out-of-bounds reads
terrelln Nov 10, 2026
3ea103d
Fix overlapping copies in CLI read-buffer coalescing
terrelln Nov 10, 2026
974238c
Fix block splitter partition bounds
terrelln Nov 10, 2026
a7b60c8
Merge pull request #4741 from nileshpatil6/fix/compress-sequences-and…
Cyan4973 Nov 11, 2026
719e528
compress: validate repcodes against retained dictionary content
terrelln Nov 10, 2026
b09de2b
linux: state the lit_capacity margin of zstd_compress_sequences_and_l…
Cyan4973 Nov 11, 2026
038be8f
legacy: check the v0.5 litlength header error before its table log
Cyan4973 Nov 11, 2026
4cf889e
Merge pull request #4782 from KSAGlory/fix/literal-capacity-contract
Cyan4973 Nov 11, 2026
18f8d17
cmake: detect clang with the C compiler id in lib/CMakeLists.txt
Cyan4973 Nov 11, 2026
8bcbe69
Merge pull request #4810 from Tyagiquamar/fix-cmake-cxx-flag-dep-4800
Cyan4973 Nov 11, 2026
6e51a24
tests: cover truncated v0.5/v0.6 dictionary entropy tables
Cyan4973 Nov 11, 2026
c4cbcaa
ci: build cmake without the tests
Cyan4973 Nov 11, 2026
f01fa3c
Merge pull request #4920 from terrelln/2026-11-10-overlap-memcpy
Cyan4973 Nov 11, 2026
64c0474
ci: run the cli-tests under ASan and UBSan
Cyan4973 Nov 11, 2026
56cb180
Reject overflowing CDict workspace sizes
terrelln Nov 10, 2026
7d46712
Reject overflowing DDict workspace sizes
terrelln Nov 11, 2026
eb1c858
Fix static DCtx allocator initialization and dictionary loading
terrelln Nov 10, 2026
0c14618
Merge pull request #4926 from meta/cmake-ci-c-only
Cyan4973 Nov 11, 2026
7c2b359
Drop single-use prefix in ZSTD_DCtx_reset if frame started
Chieler Oct 15, 2026
c46fdaa
ci: add an all-green job to each pull request workflow
Cyan4973 Nov 11, 2026
114b1bb
Merge pull request #4932 from meta/ci-all-green
Cyan4973 Nov 11, 2026
f404793
lib: report corrupted dictionaries in ZSTD_DCtx_loadDictionary()
Cyan4973 Nov 11, 2026
52dac33
Fix out-of-bounds read in COVER_selectDict shrink loop (#4922)
kevinjzhang Nov 12, 2026
02343ba
Revert "ci: add an all-green job to each pull request workflow"
Cyan4973 Nov 12, 2026
8532f54
ci: add a job that waits for all the other workflows
Cyan4973 Nov 12, 2026
3ff3b8e
Merge pull request #4924 from meta/legacy-v05-check-order
Cyan4973 Nov 12, 2026
96e0943
Merge pull request #4768 from uarif1/remove-stale-clang-hint-comments
Cyan4973 Nov 12, 2026
07fedcd
Merge pull request #4925 from meta/dctx-load-dict-error
Cyan4973 Nov 12, 2026
d6b3d23
Merge pull request #4935 from meta/ci-all-workflows
Cyan4973 Nov 12, 2026
4b80d7d
build(deps): bump actions/upload-artifact from 7.0.1 to 7.0.2
dependabot[bot] Nov 12, 2026
1319282
Reject ZSTD_decompressContinue() without ZSTD_decompressBegin()
Cyan4973 Nov 12, 2026
2744011
Merge pull request #4874 from meta/dependabot/github_actions/actions/…
Cyan4973 Nov 12, 2026
be8784e
Clarify bufferless decompression initialization requirements
terrelln Nov 11, 2026
729891c
fix off-by-one bounds check in ZSTD_seekTable_getFrameDecompressedSize
saleemno1 Jul 22, 2026
a75f136
Merge pull request #4937 from meta/dctx-continue-without-begin
Cyan4973 Nov 12, 2026
9773d8d
ci: run the jobs that fail on ubuntu-26.04 on ubuntu-24.04
Cyan4973 Nov 12, 2026
308bfb6
compress: drop pending stable input when the session is reset
Cyan4973 Nov 12, 2026
35eb4e6
compress: check pending stable input when compression starts
Cyan4973 Nov 12, 2026
c55665a
compress: let ZSTD_flushStream() and ZSTD_endStream() resume pending …
Cyan4973 Nov 12, 2026
e1cb20a
Merge pull request #4930 from meta/ci-asan-cli-tests
Cyan4973 Nov 12, 2026
5cfc430
Merge pull request #4943 from meta/fix-4868-stablein-reset
Cyan4973 Nov 12, 2026
b09d9aa
ci: Run ASAN CLI tests on ubuntu-24.04
terrelln Nov 12, 2026
a577b85
seekable_format: Reject mismatched frame sizes
terrelln Nov 12, 2026
2ad0cb9
seekable_format: Expand frame-index bounds regression coverage
terrelln Nov 12, 2026
e342561
decompress: distinguish raw DDicts from empty hash slots
terrelln Nov 11, 2026
f8936f6
decompress: grow the DDict hash table at the intended load factor
terrelln Nov 11, 2026
91f8d02
decompress: clear remaining multi-DDict references
terrelln Nov 11, 2026
b7ea606
decompress: make local dictionaries and DDict sets mutually exclusive
terrelln Nov 11, 2026
9244114
decompress: require exact multi-DDict matches for nonzero frame IDs
terrelln Nov 11, 2026
9eabb4c
decompress: resolve DDict-set entries per frame without a default
terrelln Nov 11, 2026
3afea9a
seekable_format: Reset frame state after failed seeks
terrelln Nov 12, 2026
bcd0995
seekable_format: Make decompressor reinitialization safe
terrelln Nov 12, 2026
ea8db4f
build: link the 32-bit targets without -z cet-report=error
Cyan4973 Nov 13, 2026
76d7a08
ci: lower the mmap ASLR entropy in the gcc-8 sanitizer jobs
Cyan4973 Nov 13, 2026
3c66614
build: stop forcing the gold linker in the sanitizer targets
Cyan4973 Nov 13, 2026
c7400b2
build: install qemu-user, and call its binaries when they are installed
Cyan4973 Nov 13, 2026
0ac4e75
ci: install the powerpc multilib that matches the cross compiler
Cyan4973 Nov 13, 2026
9131d8d
tests: build the old versions for x86-64 in the versions test
Cyan4973 Nov 13, 2026
1129870
ci: measure the libzstd size at a fixed target, with a uniform margin
Cyan4973 Nov 13, 2026
57bed05
ci: test the BMI2 variants from a target without BMI2
Cyan4973 Nov 13, 2026
5a01e8f
Fix 32-bit zstdmt round buffer size overflow (#4948)
kevinjzhang Nov 13, 2026
07490bd
Reduce 32-bit zstdmt maximum job size to 256 MB (#4946)
kevinjzhang Nov 13, 2026
baaa8ab
programs: reject incomplete skippable headers in list mode
terrelln Nov 12, 2026
e628508
man: fix default thread counts for -T#, ZSTD_NBTHREADS and benchmark …
fjvbn2003 Oct 16, 2026
9948edf
Merge pull request #4949 from meta/ci-ubuntu-26.04
Cyan4973 Nov 13, 2026
8cda638
ci: install gcc-7 and gcc-8 without the toolchain PPA
Cyan4973 Nov 13, 2026
fafab9e
Merge pull request #4964 from meta/ci-gcc-old-no-ppa
Cyan4973 Nov 13, 2026
3813e81
Document --max large-window decompression
Rohithmatham12 Jun 10, 2026
16b63fd
update readme wording
jlee303 Nov 13, 2026
66d34c3
zstd_preSplit: change abs64 name to ZSTD_abs64
svmhdvn Apr 7, 2026
854d1e0
programs: reject overflowing dictionary sample counts
terrelln Nov 13, 2026
4405197
fix result buffer overrun in decode-only benchmark
saleemno1 Jul 23, 2026
b7a0993
benchfn: don't memset a NULL dst buffer of size 0
xhon-pelushi Sep 30, 2026
f2347f4
Remove deprecated ZSTD_copyCCtx() and ZSTD_copyDCtx()
terrelln Nov 13, 2026
9d728bb
changelog: note removal of ZSTD_copyCCtx() and ZSTD_copyDCtx()
terrelln Nov 13, 2026
0d8d37f
ci: run qemu-consistency on ubuntu-latest
Cyan4973 Nov 14, 2026
a599a71
Merge pull request #4965 from meta/ci-qemu-consistency-latest
Cyan4973 Nov 14, 2026
9776f6d
programs: strip trailing '\r' from --filelist entries on Windows
jaypatrickhoward Sep 7, 2026
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
48 changes: 48 additions & 0 deletions .github/workflows/all-workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: all-workflows
# Waits for the other workflows run on the head commit of the pull request,
# and fails if any of them did not succeed. It finds them by itself: there is
# no list to maintain. It cannot see a workflow that does not run at all.

concurrency:
group: all-workflows-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
branches: [ dev ]

permissions:
actions: read

jobs:
check:
name: "all workflows passed"
runs-on: ubuntu-latest
timeout-minutes: 180
steps:
- name: Wait for the other workflows
env:
GH_TOKEN: ${{ github.token }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
# Latest run of each workflow on the head commit, except this workflow
query="[.workflow_runs[] | select(.name != \"$GITHUB_WORKFLOW\")]
| group_by(.workflow_id) | map(max_by(.run_number))[]
| [.name, .status, .conclusion // \"-\"] | @tsv"
# Stop when they are all completed, and unchanged since the previous poll.
# A failed API call is retried at the next poll.
prev=""
while true; do
sleep 30
runs=$(gh api "repos/$GITHUB_REPOSITORY/actions/runs?head_sha=$HEAD_SHA&per_page=100" --jq "$query") || continue
if [ -n "$runs" ] && [ "$runs" = "$prev" ] && printf '%s\n' "$runs" | awk -F'\t' '$2 != "completed" {n++} END {exit n > 0}'; then
break
fi
prev=$runs
done
printf '%s\n' "$runs"
failed=$(printf '%s\n' "$runs" | awk -F'\t' '$3 != "success" && $3 != "skipped" && $3 != "neutral"')
if [ -n "$failed" ]; then
printf 'Did not succeed:\n%s\n' "$failed"
exit 1
fi
23 changes: 22 additions & 1 deletion .github/workflows/cmake-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@ jobs:
run: |
cmake --build cmake-build --config Release

# Build without the tests, so C++ is not enabled, with CMAKE_CXX_COMPILER set as cross toolchain files do.
# The x86-64 assembly is only built when the compilation flags are applied.
cmake-c-only:
name: "CMake C only (No ZSTD_BUILD_TESTS)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # tag=v7.0.1
- name: Configure and build
run: |
cmake -S build/cmake -B cmake-build -DCMAKE_BUILD_TYPE=Release -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_CXX_COMPILER=g++
cmake --build cmake-build --parallel
- name: Check that the x86-64 assembly is built
run: |
nm cmake-build/lib/libzstd.a | grep -q HUF_decompress4X1_usingDTable_internal_fast_asm_loop

# Ubuntu-based cmake build using make wrapper
# This test uses the make-driven cmake build to ensure compatibility
# with the existing build system integration
Expand Down Expand Up @@ -125,6 +140,12 @@ jobs:
name: "Clang-CL"
runner: "windows-2022"
cmake_extra_flags: "-DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DZSTD_BUILD_TESTS=ON"
- generator: "Visual Studio 17 2022"
flags: "-T ClangCL"
name: "Clang-CL (No ZSTD_BUILD_TESTS)"
runner: "windows-2022"
# Intentionally omit ZSTD_BUILD_TESTS: C++ is not enabled, so only the C compiler id is set
cmake_extra_flags: "-DCMAKE_COMPILE_WARNING_AS_ERROR=ON"
- generator: "Visual Studio 17 2022"
flags: "-T ClangCL -A x64 -DCMAKE_C_FLAGS=/arch:AVX2"
name: "Clang-CL AVX2"
Expand Down Expand Up @@ -154,7 +175,7 @@ jobs:
# Uses native ARM64 hardware for optimal performance and compatibility testing
cmake-macos-arm64:
name: "CMake macOS ARM64 (Apple Silicon)"
runs-on: macos-14 # ARM64 runner
runs-on: macos-latest # ARM64 runner
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # tag=v7.0.1
- name: "CMake build and test (ARM64)"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install gcc-powerpc-linux-gnu gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu libc6-dev-ppc64-powerpc-cross libcurl4-gnutls-dev lib64gcc-13-dev-powerpc-cross
sudo apt-get install gcc-powerpc-linux-gnu gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu libc6-dev-ppc64-powerpc-cross libcurl4-gnutls-dev gcc-multilib-powerpc-linux-gnu
- name: gnu90 build
run: make gnu90build && make clean
- name: gnu99 build
Expand Down Expand Up @@ -99,6 +99,6 @@ jobs:
echo " are still good, copy it into the repo and commit it."
echo "> diff tests/regression/results.csv $CIRCLE_ARTIFACTS/results.csv"
diff tests/regression/results.csv $CIRCLE_ARTIFACTS/results.csv
- uses: actions/upload-artifact@v7.0.1
- uses: actions/upload-artifact@v7.0.2
with:
path: "/tmp/circleci-artifacts"
17 changes: 14 additions & 3 deletions .github/workflows/dev-long-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ jobs:
- name: gcc-8 + ASan + UBSan + Test Zstd
# See https://askubuntu.com/a/1428822
run: |
# the ASan runtime of gcc-8 loops on DEADLYSIGNAL with the 32-bit mmap ASLR of recent kernels
sudo sysctl -w vm.mmap_rnd_bits=28
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu focal main universe" | sudo tee -a /etc/apt/sources.list
sudo apt-get -qqq update
make gcc8install
sudo apt-get -yq --no-install-suggests --no-install-recommends install libc6-dev-i386 gcc-multilib gcc-8 gcc-8-multilib
CC=gcc-8 make -j uasan-test-zstd </dev/null V=1

clang-asan-ubsan-testzstd:
Expand All @@ -127,6 +129,13 @@ jobs:
- name: clang + ASan + UBSan + Test Zstd
run: CC=clang make -j uasan-test-zstd </dev/null V=1

clang-asan-ubsan-cli-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # tag=v7.0.1
- name: clang + ASan + UBSan + CLI tests
run: CC=clang make -j uasan-test-cli-tests

gcc-asan-ubsan-testzstd-32bit:
runs-on: ubuntu-latest
steps:
Expand All @@ -148,9 +157,11 @@ jobs:
- name: gcc-8 + ASan + UBSan + Fuzz Test
# See https://askubuntu.com/a/1428822
run: |
# the ASan runtime of gcc-8 loops on DEADLYSIGNAL with the 32-bit mmap ASLR of recent kernels
sudo sysctl -w vm.mmap_rnd_bits=28
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu focal main universe" | sudo tee -a /etc/apt/sources.list
sudo apt-get -qqq update
make gcc8install
sudo apt-get -yq --no-install-suggests --no-install-recommends install libc6-dev-i386 gcc-multilib gcc-8 gcc-8-multilib
CC=gcc-8 FUZZER_FLAGS="--long-tests" make -j clean uasan-fuzztest

clang-asan-ubsan-fuzz:
Expand Down Expand Up @@ -331,7 +342,7 @@ jobs:
dry-run: false
sanitizer: ${{ matrix.sanitizer }}
- name: Upload Crash
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # tag=v7.0.1
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # tag=v7.0.2
if: failure() && steps.build.outcome == 'success'
with:
name: ${{ matrix.sanitizer }}-artifacts
Expand Down
73 changes: 45 additions & 28 deletions .github/workflows/dev-short-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
run: |
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu focal main universe" | sudo tee -a /etc/apt/sources.list
sudo apt-get -qqq update
make gcc7install
sudo apt-get -yq --no-install-suggests --no-install-recommends install libc6-dev-i386 gcc-multilib gcc-7 gcc-7-multilib
CC=gcc-7 CFLAGS=-Werror make -j all
make clean
LDFLAGS=-Wl,--no-undefined make -C lib libzstd-mt
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
run: |
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu focal main universe" | sudo tee -a /etc/apt/sources.list
sudo apt-get -qqq update
make gcc8install
sudo apt-get -yq --no-install-suggests --no-install-recommends install libc6-dev-i386 gcc-multilib gcc-8 gcc-8-multilib
CC=gcc-8 CFLAGS="-Werror" make -j all

make-external-compressors:
Expand Down Expand Up @@ -339,19 +339,25 @@ jobs:
/t:Clean,Build /p:Platform=${{matrix.platform}} /p:Configuration=${{matrix.configuration}} /warnaserror
/p:InstructionSet=${{matrix.arch}}

# This tests that we don't accidentally grow the size too much.
# This tests that we don't accidentally grow the size too much,
# for example when a size reduction option stops working (#3066).
# If the size grows intentionally, you can raise these numbers.
# But we do need to think about binary size, since it is a concern.
# Each limit is the size measured with GCC 15.2 on 2026-11-12, plus about 30%, rounded up.
# -march=x86-64 makes the size independent of the compiler's default target:
# GCC 15 on ubuntu-26.04 runners targets x86-64-v3, which makes libzstd about 20% larger.
# When a limit is exceeded, check whether the growth comes from the code or the compiler,
# then measure again (check_size.py prints the sizes) and reset all limits with this rule.
libzstd-size:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # tag=v7.0.1
- name: libzstd size test
run: |
make clean && make -j -C lib libzstd && ./tests/check_size.py lib/libzstd.so 1100000
make clean && make -j -C lib libzstd ZSTD_LIB_COMPRESSION=0 ZSTD_LIB_DICTBUILDER=0 && ./tests/check_size.py lib/libzstd.so 400000
make clean && make -j -C lib libzstd ZSTD_LIB_MINIFY=1 && ./tests/check_size.py lib/libzstd.so 300000
make clean && make -j -C lib libzstd ZSTD_LIB_MINIFY=1 ZSTD_LIB_COMPRESSION=0 ZSTD_LIB_DICTBUILDER=0 && ./tests/check_size.py lib/libzstd.so 80000
make clean && make -j -C lib libzstd MOREFLAGS=-march=x86-64 && ./tests/check_size.py lib/libzstd.so 1200000
make clean && make -j -C lib libzstd MOREFLAGS=-march=x86-64 ZSTD_LIB_COMPRESSION=0 ZSTD_LIB_DICTBUILDER=0 && ./tests/check_size.py lib/libzstd.so 260000
make clean && make -j -C lib libzstd MOREFLAGS=-march=x86-64 ZSTD_LIB_MINIFY=1 && ./tests/check_size.py lib/libzstd.so 390000
make clean && make -j -C lib libzstd MOREFLAGS=-march=x86-64 ZSTD_LIB_MINIFY=1 ZSTD_LIB_COMPRESSION=0 ZSTD_LIB_DICTBUILDER=0 && ./tests/check_size.py lib/libzstd.so 100000

minimal-decompressor-macros:
runs-on: ubuntu-latest
Expand All @@ -370,17 +376,19 @@ jobs:
make clean && make check ZSTD_LIB_EXCLUDE_COMPRESSORS_DFAST_AND_UP=1 MOREFLAGS="-Werror"
make clean && make check ZSTD_LIB_EXCLUDE_COMPRESSORS_GREEDY_AND_UP=1 MOREFLAGS="-Werror"

# -march=x86-64 starts from a target without BMI2:
# GCC on ubuntu-26.04 runners targets x86-64-v3, which enables BMI2 by default.
dynamic-bmi2:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # tag=v7.0.1
- name: dynamic bmi2 tests
run: |
make clean && make -j check MOREFLAGS="-O0 -Werror -mbmi2"
make clean && make -j check MOREFLAGS="-O0 -Werror -DDYNAMIC_BMI2=1"
make clean && make -j check MOREFLAGS="-O0 -Werror -DDYNAMIC_BMI2=1 -mbmi2"
make clean && make -j check MOREFLAGS="-O0 -Werror -DDYNAMIC_BMI2=0"
make clean && make -j check MOREFLAGS="-O0 -Werror -DDYNAMIC_BMI2=0 -mbmi2"
make clean && make -j check MOREFLAGS="-O0 -Werror -march=x86-64 -mbmi2"
make clean && make -j check MOREFLAGS="-O0 -Werror -march=x86-64 -DDYNAMIC_BMI2=1"
make clean && make -j check MOREFLAGS="-O0 -Werror -march=x86-64 -DDYNAMIC_BMI2=1 -mbmi2"
make clean && make -j check MOREFLAGS="-O0 -Werror -march=x86-64 -DDYNAMIC_BMI2=0"
make clean && make -j check MOREFLAGS="-O0 -Werror -march=x86-64 -DDYNAMIC_BMI2=0 -mbmi2"

test-variants:
runs-on: ubuntu-latest
Expand All @@ -393,20 +401,21 @@ jobs:

qemu-consistency:
name: QEMU ${{ matrix.name }}
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
strategy:
fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix failed.
matrix:
include: [
{ name: ARM, xcc_pkg: gcc-arm-linux-gnueabi, xcc: arm-linux-gnueabi-gcc, xemu_pkg: qemu-system-arm, xemu: qemu-arm-static },
{ name: ARM64, xcc_pkg: gcc-aarch64-linux-gnu, xcc: aarch64-linux-gnu-gcc, xemu_pkg: qemu-system-aarch64,xemu: qemu-aarch64-static },
{ name: PPC, xcc_pkg: gcc-powerpc-linux-gnu, xcc: powerpc-linux-gnu-gcc, xemu_pkg: qemu-system-ppc, xemu: qemu-ppc-static },
{ name: PPC64LE, xcc_pkg: gcc-powerpc64le-linux-gnu, xcc: powerpc64le-linux-gnu-gcc, xemu_pkg: qemu-system-ppc, xemu: qemu-ppc64le-static },
{ name: S390X, xcc_pkg: gcc-s390x-linux-gnu, xcc: s390x-linux-gnu-gcc, xemu_pkg: qemu-system-s390x, xemu: qemu-s390x-static },
{ name: MIPS, xcc_pkg: gcc-mips-linux-gnu, xcc: mips-linux-gnu-gcc, xemu_pkg: qemu-system-mips, xemu: qemu-mips-static },
{ name: RISC-V, xcc_pkg: gcc-14-riscv64-linux-gnu, xcc: riscv64-linux-gnu-gcc-14, xemu_pkg: qemu-system-riscv64,xemu: qemu-riscv64-static },
{ name: M68K, xcc_pkg: gcc-m68k-linux-gnu, xcc: m68k-linux-gnu-gcc, xemu_pkg: qemu-system-m68k, xemu: qemu-m68k-static },
{ name: SPARC, xcc_pkg: gcc-sparc64-linux-gnu, xcc: sparc64-linux-gnu-gcc, xemu_pkg: qemu-system-sparc, xemu: qemu-sparc64-static },
{ name: ARM, xcc_pkg: gcc-arm-linux-gnueabi, xcc: arm-linux-gnueabi-gcc, xemu: qemu-arm },
{ name: ARM64, xcc_pkg: gcc-aarch64-linux-gnu, xcc: aarch64-linux-gnu-gcc, xemu: qemu-aarch64 },
{ name: PPC, xcc_pkg: gcc-powerpc-linux-gnu, xcc: powerpc-linux-gnu-gcc, xemu: qemu-ppc },
{ name: PPC64LE, xcc_pkg: gcc-powerpc64le-linux-gnu, xcc: powerpc64le-linux-gnu-gcc, xemu: qemu-ppc64le },
{ name: S390X, xcc_pkg: gcc-s390x-linux-gnu, xcc: s390x-linux-gnu-gcc, xemu: qemu-s390x },
# ubuntu-26.04 has no MIPS cross compiler: MIPS builds in a Debian container
{ name: MIPS, xcc_pkg: "", xcc: mips-linux-gnu-gcc, xemu: qemu-mips },
{ name: RISC-V, xcc_pkg: gcc-riscv64-linux-gnu, xcc: riscv64-linux-gnu-gcc, xemu: qemu-riscv64 },
{ name: M68K, xcc_pkg: gcc-m68k-linux-gnu, xcc: m68k-linux-gnu-gcc, xemu: qemu-m68k },
{ name: SPARC, xcc_pkg: gcc-sparc64-linux-gnu, xcc: sparc64-linux-gnu-gcc, xemu: qemu-sparc64 },
]
env: # Set environment variables
XCC: ${{ matrix.xcc }}
Expand All @@ -416,9 +425,14 @@ jobs:
- name: apt update & install
run: |
sudo apt-get update
sudo apt-get install gcc-multilib g++-multilib qemu-utils qemu-user-static
sudo apt-get install ${{ matrix.xcc_pkg }} ${{ matrix.xemu_pkg }}
# qemu-user-binfmt: the tests run the cross-compiled datagen directly
sudo apt-get install gcc-multilib g++-multilib qemu-user qemu-user-binfmt
sudo apt-get install ${{ matrix.xcc_pkg }}
# load the binfmt handlers of qemu-user-binfmt, and check the one of this target
sudo systemctl restart systemd-binfmt
cat /proc/sys/fs/binfmt_misc/$XEMU
- name: Environment info
if: ${{ matrix.name != 'MIPS' }}
run: |
echo && which $XCC
echo && $XCC --version
Expand Down Expand Up @@ -456,14 +470,17 @@ jobs:
- name: MIPS
if: ${{ matrix.name == 'MIPS' }}
run: |
LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check
docker run --rm -v "$PWD":/zstd -w /zstd -e XCC -e XEMU debian:13 sh -c '
apt-get -qq update && apt-get -qq install -y file make gcc-mips-linux-gnu qemu-user >/dev/null &&
$XCC --version && $XEMU --version &&
LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check'
- name: RISC-V
if: ${{ matrix.name == 'RISC-V' }}
run: |
LDFLAGS="-static" CC=$XCC QEMU_SYS=$XEMU make clean check
CFLAGS="-march=rv64gcv -O3" LDFLAGS="-static -DMEM_FORCE_MEMORY_ACCESS=0" CC=$XCC QEMU_SYS="$XEMU -cpu rv64,v=true,vlen=128" make clean check
CFLAGS="-march=rv64gcv -O3" LDFLAGS="-static -DMEM_FORCE_MEMORY_ACCESS=0" CC=$XCC QEMU_SYS="$XEMU -cpu rv64,v=true,vlen=256" make clean check
CFLAGS="-march=rv64gcv -O3" LDFLAGS="-static -DMEM_FORCE_MEMORY_ACCESS=0" CC=$XCC QEMU_SYS="$XEMU -cpu rv64,v=true,vlen=512" make clean check
CFLAGS="-march=rv64gcv -O3" LDFLAGS="-static -DMEM_FORCE_MEMORY_ACCESS=0" CC=$XCC QEMU_SYS="$XEMU -cpu max,vlen=128" make clean check
CFLAGS="-march=rv64gcv -O3" LDFLAGS="-static -DMEM_FORCE_MEMORY_ACCESS=0" CC=$XCC QEMU_SYS="$XEMU -cpu max,vlen=256" make clean check
CFLAGS="-march=rv64gcv -O3" LDFLAGS="-static -DMEM_FORCE_MEMORY_ACCESS=0" CC=$XCC QEMU_SYS="$XEMU -cpu max,vlen=512" make clean check
- name: M68K
if: ${{ matrix.name == 'M68K' }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # tag=v7.0.1
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # tag=v7.0.2
with:
name: SARIF file
path: results.sarif
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
mv bin/ zstd-${{ github.ref_name }}-${{matrix.ziparch}}/

- name: Publish zstd-$VERSION-${{matrix.ziparch}}.zip for manual inspection
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # tag=v7.0.1
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # tag=v7.0.2
with:
compression-level: 9 # maximum compression
if-no-files-found: error # defaults to `warn`
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
v1.6.0 (Dec 2025)
fix: on a static DCtx, `ZSTD_DCtx_loadDictionary()` and `ZSTD_DCtx_refPrefix()` now return `ZSTD_error_memory_allocation` for nonempty dictionaries and prefixes instead of allocating and leaking an internal DDict
api: legacy format support is now disabled by default
api: experimental `ZSTD_d_refMultipleDDicts` now requires an exact match for nonzero frame dictionary IDs in the registered set; missing nonzero IDs return `ZSTD_error_dictionary_wrong` instead of falling back to the current dictionary. Frames with dictionary ID 0 use a registered ID-0 DDict if present, or no dictionary otherwise.
api: set-based multi-DDict decoding no longer remembers a selected dictionary; legacy frames require single-dictionary or explicit-dictionary decoding
api: disabling experimental `ZSTD_d_refMultipleDDicts` releases every dictionary reference in its set; no selected dictionary is retained for subsequent decompression
api: removed the deprecated experimental functions `ZSTD_copyCCtx()` and `ZSTD_copyDCtx()`
build: `ZSTD_LEGACY_SUPPORT` defaults to `0` in Makefile and CMake

V1.5.7 (Feb 2025)
Expand Down
Loading
Loading