aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-03-21Merge pull request #3984 from facebook/devupstream-releaseYann Collet
v1.5.6
2024-03-21Merge pull request #3985 from facebook/scorecard_permissionYann Collet
try to silence some scorecard warnings
2024-03-21try to silence some scorecard warningsYann Collet
2024-03-21Merge pull request #3977 from facebook/doc_advancedYann Collet
Doc update
2024-03-21fix -Werror=pointer-arith in fuzzers (#3983)Elliot Gorokhovsky
2024-03-21Merge pull request #3982 from embg/fuzzer_readmeYann Collet
Document the process for adding a new fuzzer
2024-03-21Merge pull request #3975 from terrelln/2024-03-18-cmake-docsYann Collet
[cmake] Emit warnings for contradictory build settings
2024-03-21Merge pull request #3979 from yoniko/Werror-fuzzYann Collet
Fail on errors when building fuzzers
2024-03-21Merge pull request #3981 from terrelln/2024-03-19-generate-sequencesYann Collet
Fix & fuzz ZSTD_generateSequences
2024-03-21Fix & fuzz ZSTD_generateSequencesNick Terrell
This function was seriously flawed: * It didn't do output bounds checks * It produced invalid sequences when an uncompressed or RLE block was emitted * It produced invalid sequences when the block splitter was enabled * It produced invalid sequences when ZSTD_c_targetCBlockSize was enabled I've attempted to fix these issues, but this function is just a bad idea, so I've marked it as deprecated and unsafe. We should replace it with `ZSTD_extractSequences()` which operates on a compressed frame.
2024-03-20Fuzzing and bugfixes for magicless-format decoding (#3976)Elliot Gorokhovsky
* fuzzing and bugfixes for magicless format * reset dctx before each decompression * do not memcmp empty buffers * nit: decompressor errata
2024-03-19Add docs on how to add a new fuzzerElliot Gorokhovsky
2024-03-18Fail on errors when building fuzzersYonatan Komornik
Fails on errors when building fuzzers with `fuzz.py` (adds `Werror`). Currently allows `declaration-after-statement`, `c++-compat` and `deprecated` as they are abundant in code (some fixes to `declaration-after-statement` are presented in this commit).
2024-03-18Fix bugs in simple decompression fuzzer (#3978)Yonatan Komornik
Fixes 2 issue in `simple_decompress.c`: 1. Wrong type used for storing the results of `ZSTD_findDecompressedSize` resulting in never matching to `ZSTD_CONTENTSIZE_ERROR` or `ZSTD_CONTENTSIZE_UNKNOWN`. 2. Experimental API is used (`ZSTD_findDecompressedSize`) without defining `ZSTD_STATIC_LINKING_ONLY`.
2024-03-18fix ZSTD_TARGETCBLOCKSIZE_MIN testYann Collet
when requested CBlockSize is too low, bound it to the minimum instead of returning an error.
2024-03-18fix typoYann Collet
2024-03-18updated API manualYann Collet
2024-03-18add doc on CCtx UB stateYann Collet
2024-03-18add a paragraph on UB DCtx state after errorYann Collet
2024-03-18update targetCBlockSize documentationYann Collet
2024-03-18[cmake] Emit warnings for contradictory build settingsNick Terrell
Document that the `ZSTD_BUILD_{SHARED,STATIC}` take precedence over `BUILD_SHARED_LIBS` when exactly one is ON. Thanks to @teo-tsirpanis for pointing out the potentially confusing behavior.
2024-03-18pzstd: use c++14 without conditionsAlexander Kanavin
Doing this check with a direct c++ snippet is prone to portability problems: - \043 is not portable between shells: dash expands it to #, bash does not; - using # directly works with make 4.3 but does not with make 4.2. Let's just use the c++ version that covers both the code and the gtest.
2024-03-18Implement one-shot fallback for magicless format (#3971)Elliot Gorokhovsky
2024-03-18[cmake] Fix up PR #3716Nick Terrell
* Make a variable `PublicHeaders` for Zstd's public headers * Add `PublicHeaders` to `Headers`, which was missing * Only export `${LIBRARY_DIR}` publicly, not `common/` * Switch the `target_include_directories()` to `INTERFACE` because zstd uses relative includes internally, so doesn't need any include directories to build * Switch installation to use the `PublicHeaders` variable, and test that the right headers are installed
2024-03-18Makes it possible to use the lib through FetchContent or ExternalProject_Adddsvi
2024-03-18Merge pull request #3973 from ↵Yann Collet
facebook/dependabot/github_actions/github/codeql-action-3.24.7 Bump github/codeql-action from 3.24.6 to 3.24.7
2024-03-18Merge pull request #3972 from facebook/dependabot/github_actions/actions/cache-4Yann Collet
Bump actions/cache from 3 to 4
2024-03-18Bump github/codeql-action from 3.24.6 to 3.24.7dependabot[bot]
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.6 to 3.24.7. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/8a470fddafa5cbb6266ee11b37ef4d8aae19c571...3ab4101902695724f9365a384f86c1074d94e18c) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2024-03-18Bump actions/cache from 3 to 4dependabot[bot]
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
2024-03-15Merge pull request #3969 from facebook/v156_prepYann Collet
bump version number
2024-03-15Merge pull request #3966 from facebook/debug_lineNumberYann Collet
add line number to debug traces
2024-03-14update CHANGELOG for v1.5.6Yann Collet
2024-03-14updated version to v1.5.6Yann Collet
2024-03-14Remove duplicate and incorrect docs in zstd_decompress.c (#3967)Elliot Gorokhovsky
2024-03-14add line number to debug tracesYann Collet
2024-03-14[cmake] Always create libzstd targetNick Terrell
If both `ZSTD_BUILD_SHARED` and `ZSTD_BUILD_STATIC` are set, then cmake exports the libraries `libzstd_shared` and `libzstd_static` only. It does not export `libzstd`, which is only exported when exactly one of `ZSTD_BUILD_SHARED` and `ZSTD_BUILD_STATIC` is set. This PR exports `libzstd` in that case, based on the value of the standard CMake variable [`BUILD_SHARED_LIBS`](https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html). This ensures that `libzstd` can always be used to refer to the exported zstd library, since the build errors if neither `ZSTD_BUILD_SHARED` nor `ZSTD_BUILD_STATIC` are set. I tested all the possible combinations of `ZSTD_BUILD_SHARED`, `ZSTD_BUILD_STATIC`, and `BUILD_SHARED_LIBS` and they always worked as expected: * If only exactly one of `ZSTD_BUILD_SHARED` and `ZSTD_BUILD_STATIC` is set, that is used as `libzstd`. * Otherwise, libzstd is set based on `BUILD_SHARED_LIBS`. Fixes #3859.
2024-03-14Merge pull request #3964 from felixhandte/promote-tgt-c-blk-size-to-stableFelix Handte
Promote `ZSTD_c_targetCBlockSize` Parameter to Stable API
2024-03-14Merge pull request #3963 from ↵Felix Handte
felixhandte/also-handle-hidden-files-output-dir-mirror Remove Erroneous Exclusion of Hidden Files and Folders in `--output-dir-mirror`
2024-03-13Merge pull request #3962 from facebook/cover_lessIncludesYann Collet
reduce the amount of #include in cover.h
2024-03-13Merge pull request #3960 from felixhandte/use-utimensat-on-posix-2001Felix Handte
Use `utimensat()` on FreeBSD
2024-03-13Promote `ZSTD_c_targetCBlockSize` Parameter to Stable APIW. Felix Handte
This feature has demonstrated itself to be useful in web compression and we want to encourage other folks to use it. But we currently make it difficult to do so since it's locked away in the experimental API. The API itself is really straightforward and I think it's fine to commit to maintaining support / compatibility for this API even if in the future the underlying implementation may continue to evolve. Note that this commit changes its enum name and also its numeric value. Users who respected the instructions of using the experimental API should be fine with both of these changes since they should only have referred to it by the. Conceivably someone could have done bad feature detection of this capability by doing `#ifdef ZSTD_c_targetCBlockSize` which will now return false since it's no longer a macro... but I think that's an acceptable hypothetical breakage.
2024-03-13Remove Erroneous Exclusion of Hidden Files and Folders in `--output-dir-mirror`W. Felix Handte
2024-03-13Add a Few TestsW. Felix Handte
2024-03-13Use `utimensat()` on FreeBSDW. Felix Handte
FreeBSD only claims to support POSIX 2001 [0]. But they do in fact support `utimensat()`. This adds a specific check to opt them in to using it. This value was selected by consulting [1]. See discussion on #3952. Further addresses #3748. [0] https://github.com/freebsd/freebsd-src/blob/937a0055858a098027f464abf0b2b1ec5d36748f/sys/sys/unistd.h#L96 [1] https://docs.freebsd.org/en/books/porters-handbook/versions/
2024-03-13[asm][aarch64] Mark that BTI and PAC are supportedNick Terrell
Mark that `huf_decompress_amd64.S` supports BTI and PAC, which it trivially does because it is empty for aarch64. The issue only requested BTI markings, but it also makes sense to mark PAC, which is the only other feature. Also run add a test for this mode to the ARM64 QEMU test. Before this PR it warns on `huf_decompress_amd64.S`, after it doesn't. Fixes Issue #3841.
2024-03-13reduce the amount of includes in "cover.h"Yann Collet
2024-03-13Merge pull request #3958 from facebook/doc3698Yann Collet
updated documentation
2024-03-13Merge pull request #3956 from facebook/fix3702Yann Collet
Do not truncate file name in verbose mode
2024-03-13[CI] Run tests with CMake on WindowsNick Terrell
Build and run tests on Windows with CMake
2024-03-13[cpu] Backport fix for rbx clobbering on Windows with ClangNick Terrell
Backport folly fix for rbx clobbering: https://github.com/facebook/folly/commit/f22f88b8b9d70160388f0f149bc9abaeb82c250b This supercedes PR #3646.