Commit Graph
10845 Commits
Author SHA1 Message Date
Nick TerrellandNick Terrell f0937b83d9 [cmake] Fix -z noexecstack portability
Summary:
Issue reported by @ryandesign and @MarcusCalhoun-Lopez.

CMake doesn't support spaces in flags. This caused older versions of gcc to
ignore the unknown flag "-z noexecstack" on MacOS since it was interpreted as a
single flag, not two separate flags. Then, during compilation it was treated as
"-z" "noexecstack", which was correctly forwarded to the linker. But the MacOS
linker does not support `-z noexecstack` so compilation failed.

The fix is to use `-Wl,-z,noexecstack`. This is never misinterpreted by a
compiler. However, not all compilers support this syntax to forward flags to the
linker. To fix this issue, we check if all the relevant `noexecstack` flags have
been successfully set, and if they haven't we disable assembly.

See also PR#4056 and PR#4061. I decided to go a different route because this is
simpler. It might not successfully set these flags on some compilers, but in that
case it also disables assembly, so they aren't required.

Test Plan:
```
mkdir build-cmake
cmake ../build/cmake/CMakeLists.txt
make -j
```

See that the linker flag is successfully detected & that assembly is enabled.

Run the same commands on MacOS which doesn't support `-Wl,-z,noexecstack` and see
that everything compiles and that `LD_FLAG_WL_Z_NOEXECSTACK` and
`ZSTD_HAS_NOEXECSTACK` are both false.
2024-12-20 15:06:23 -08:00
BentandNick Terrell 5a7f5c745c removed debug echos 2024-12-20 07:33:53 -08:00
BentandNick Terrell d06e8778bc added UNAME_TARGET_SYSTEM build flag to configure shared lib flags 2024-12-20 07:33:53 -08:00
Yann ColletandGitHub 0218c8de0f Merge pull request #4212 from diegonc/t/fix-test-on-gnuhurd
tests: fix non-regular file test on GNU/Hurd
2024-12-16 20:43:34 -08:00
Yann ColletandGitHub 2d8710c447 Merge pull request #4213 from kevinjzhang/CI
Move sanitizer CI jobs back to ubuntu-latest
2024-12-16 20:43:13 -08:00
Yann ColletandGitHub 5a1c5014cb Merge pull request #4214 from facebook/ldm_bucketLog
minor: more accurate parameter for `ZSTD_ldm_insertEntry()`
2024-12-16 20:43:00 -08:00
Yann Collet 50ca9984ad minor: more accurate parameter
just pass ldm_bucketLog, instead of the entire ldm* state
2024-12-14 11:57:14 -08:00
Victor ZhangandGitHub f7a8bb1263 Merge pull request #4210 from facebook/cm310
Update cmake minimum requirement to 3.10
2024-12-13 14:57:52 -08:00
Elliot GorokhovskyandKevin Zhang 7236e05b0a Revert "Pin tsan and msan CI jobs to ubuntu-20.04 (#3945)"
This reverts commit ee6acaf26b.
2024-12-13 10:44:54 -08:00
Victor Zhang 1198a582d3 Update VERSION_LESS usage to VERSION_GREATER_THAN 2024-12-12 11:39:40 -08:00
daniellerozenblitandGitHub 17beeb5d1a Change CLI to employ multithreading by default (#4211)
* Change CLI to employ multithreading by default

* Document changes to benchmarking, print number of threads for display level >= 4, and add lower bound of 1 for the default number of threads
2024-12-12 13:09:29 -05:00
Diego Nieto Cid 4a4786bef0 tests: fix non-regular file test on GNU/Hurd
Since commit b21b03ca6 [1] the behaviour of writes to /dev/zero has been
fixed and now the non-regular file removal test no longer needs to be
done on /dev/random (which no longer works as random is not writable now).

[1] https://git.savannah.gnu.org/cgit/hurd/hurd.git/commit/?id=b21b03ca624b89caeedfe58430cea4b40317d39f
2024-12-10 10:30:52 -03:00
Victor Zhang e190e7944e Update cmake minimum requirement to 3.10
CMake warns on the current minimum requirement (3.5). Update to 3.10.
This means support is still available for the default on Ubuntu 18.04, which
exited LTS standard in April of 2023.
[draft]
2024-12-09 10:53:38 -08:00
Yann ColletandGitHub 709be6c227 Merge pull request #4208 from facebook/dependabot/github_actions/msys2/setup-msys2-2.26.0
Bump msys2/setup-msys2 from 2.25.0 to 2.26.0
2024-12-08 22:17:49 -08:00
dependabot[bot]andGitHub c254ea097b Bump msys2/setup-msys2 from 2.25.0 to 2.26.0
Bumps [msys2/setup-msys2](https://github.com/msys2/setup-msys2) from 2.25.0 to 2.26.0.
- [Release notes](https://github.com/msys2/setup-msys2/releases)
- [Changelog](https://github.com/msys2/setup-msys2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/msys2/setup-msys2/compare/c52d1fa9c7492275e60fe763540fb601f5f232a1...d44ca8e88d8b43d56cf5670f91747359d5537f97)

---
updated-dependencies:
- dependency-name: msys2/setup-msys2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-09 05:38:13 +00:00
郑苏波 (Super Zheng)andNick Terrell 5e0a83ec25 Disallow 32-bit mode in clang section
Fix register %rbx is only available in 64-bit mode
2024-12-04 06:47:32 -08:00
Yann ColletandGitHub 82d470564d Merge pull request #4201 from rorosen/seek-table-create-null-check
prevent possible segfault when creating seek table
2024-11-26 17:59:42 -08:00
Yann ColletandGitHub 2b36d4bc1c Merge pull request #4202 from nhz2/fix-compressBound-typo
Fix typo in ZSTD_compressBound docs
2024-11-26 17:59:25 -08:00
Yann ColletandGitHub 7f11e6d2b6 Merge pull request #4205 from DimitriPapadopoulos/codespell
Fix new typos found by codespell
2024-11-26 09:59:25 -08:00
Dimitri Papadopoulos fcf88ae39b Fix new typos found by codespell 2024-11-26 11:15:39 +01:00
Yann ColletandGitHub 1958fff050 Merge pull request #4199 from jimis/fix_filesize_print
Fix printing of filesize if >4GB
2024-11-25 08:54:11 -08:00
Robert Rose b683c0dbe2 prevent possible segfault when creating seek table
Add a check whether the seek table of a `ZSTD_seekable` is initialized
before creating a new seek table from it. Return `NULL`, if the check
fails.
2024-11-25 08:57:25 +01:00
nhz2 10beb7cb53 Fix typo in ZSTD_compressBound docs 2024-11-24 19:05:15 -05:00
Dimitrios Apostolou 194062a4e7 Fix printing of filesize if >4GB 2024-11-20 16:11:17 +01:00
Yann ColletandGitHub b0a179d469 Merge pull request #4196 from facebook/dependabot/github_actions/msys2/setup-msys2-2.25.0
Bump msys2/setup-msys2 from 2.24.1 to 2.25.0
2024-11-18 08:34:40 -08:00
dependabot[bot]andGitHub a9d279c97c Bump msys2/setup-msys2 from 2.24.1 to 2.25.0
Bumps [msys2/setup-msys2](https://github.com/msys2/setup-msys2) from 2.24.1 to 2.25.0.
- [Release notes](https://github.com/msys2/setup-msys2/releases)
- [Changelog](https://github.com/msys2/setup-msys2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/msys2/setup-msys2/compare/ddf331adaebd714795f1042345e6ca57bd66cea8...c52d1fa9c7492275e60fe763540fb601f5f232a1)

---
updated-dependencies:
- dependency-name: msys2/setup-msys2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 05:12:44 +00:00
Yann ColletandGitHub 45fdc5f9e4 Merge pull request #4191 from lukaso/fix-macos-min-version-sdk-path
cmake: Fix #4038 MacOS target older OS and SDK versions
2024-11-11 10:27:57 -08:00
Yann ColletandGitHub 314092f150 Merge pull request #4194 from facebook/dependabot/github_actions/github/codeql-action-3.27.1
Bump github/codeql-action from 3.26.2 to 3.27.1
2024-11-11 07:54:06 -08:00
dependabot[bot]andGitHub 2d1bbc37eb Bump github/codeql-action from 3.26.2 to 3.27.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.2 to 3.27.1.
- [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/429e1977040da7a23b6822b13c129cd1ba93dbb2...4f3212b61783c3c68e8309a0f18a699764811cda)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-11 05:27:06 +00:00
Yann ColletandGitHub b2c5bc16d9 Merge pull request #4188 from facebook/qnx_include
blind fix for QNX
2024-11-10 12:34:05 -08:00
Lukas Oberhuber d0fe334c85 cmake: Fix #4038 MacOS target older OS and SDK versions
This fix ensures that when `MACOSX_DEPLOYMENT_TARGET` and `SDKROOT` are set, they are respected when building the libraries and executables.
2024-11-08 00:08:33 +00:00
Yann Collet b3035b36c6 blind fix for QNX
following notification from @rainbowball.
fix #4186.

Note: there is currently no QNX compilation test in CI
so this is a "blind" fix,
and this target can be silently broken again in the future.
2024-11-05 00:09:13 -08:00
Yann ColletandGitHub 51eb7daf39 Merge pull request #4184 from facebook/ZSTD_getErrorCode
elevated ZSTD_getErrorCode() to stable status
2024-11-04 21:55:56 -08:00
Yann Collet 2e02cd330d inform manual users that it's automatically generated
suggested by @Eugeny1
2024-10-31 15:06:48 -07:00
Yann Collet adbb536d00 fixed single file library test
copy "zstd_errors.h" alongside "zstd.h" to pass compilation test.
2024-10-31 14:38:36 -07:00
Yann Collet d9553fd218 elevated ZSTD_getErrorCode() to stable status
answering #4183
2024-10-31 14:15:50 -07:00
Yann ColletandGitHub 15c29168b7 Merge pull request #4180 from facebook/split_param
Block splitter control parameter
2024-10-31 14:15:29 -07:00
Yann Collet bbaba45589 change experimental parameter name
from ZSTD_c_useBlockSplitter to ZSTD_c_splitAfterSequences.
2024-10-31 13:43:40 -07:00
Yann Collet 4f93206d62 changed variable name to ZSTD_c_blockSplitterLevel
suggested by @terrelln
2024-10-29 11:12:09 -07:00
Yann Collet f593ccda04 removed trace left over 2024-10-28 16:57:01 -07:00
Yann Collet fcbf6b014a fixed minor conversion warning 2024-10-28 16:47:38 -07:00
Yann Collet 37706a677c added a test
test both that the new parameter works as intended,
and that the over-split protection works as intended
2024-10-28 16:31:15 -07:00
Yann Collet 226ae73311 expose new parameter ZSTD_c_blockSplitter_level 2024-10-28 16:31:15 -07:00
Yann Collet 01474bf73b add internal compression parameter preBlockSplitter_level
not yet exposed to the interface.

Also: renames `useBlockSplitter` to `postBlockSplitter`
to better qualify the difference between the 2 settings.
2024-10-28 16:31:15 -07:00
Yann ColletandGitHub 5bae43b411 Merge pull request #4178 from facebook/split_fromBorders
Add fastest block-splitter variant
2024-10-28 16:30:49 -07:00
Yann Collet 4e1a87976f update regression results 2024-10-25 16:33:00 -07:00
Yann Collet 5b4ce643f0 update ZSTD_splitBlock() documentation 2024-10-25 16:25:02 -07:00
Yann Collet e557abc8a0 new block splitting variant _fromBorders
less precise but still suitable for `fast` strategy.
2024-10-25 16:13:55 -07:00
Yann ColletandGitHub 7fb5347e88 Merge pull request #4176 from facebook/sample11
Added faster block splitter variants for levels 3-7
2024-10-25 16:13:17 -07:00
Yann Collet c63b5d2294 update regression results 2024-10-24 14:47:55 -07:00