1
0
mirror of https://github.com/facebook/zstd.git synced 2025-03-07 01:10:04 +02:00

10843 Commits

Author SHA1 Message Date
Yann Collet
aa76eeafb7
Merge pull request #4067 from QBos07/filterfix
Fix $filter operants and Msys/Cygwin
2024-06-12 10:55:18 -07:00
Yann Collet
7ddf633a8a
Merge pull request #4065 from embg/freebsd_ci
Drop support for FreeBSD 13.2 CI
2024-06-12 09:54:25 -07:00
Quentin Boswank
f19c98228f Fix $filter and Msys/Cygwin
- switched the patter and input of $filter into the right places
- added pattern wildcard to MSYS_NT & CYGWIN_NT as they change with windows versions
- correctly identify MSYS2, even in an env like MINGW64
2024-06-05 18:37:27 +02:00
Yann Collet
2acf90431a minor:doc: specify decompression behavior in presence of multiple concatenated frames
directly at ZSTD_decompress() level.
2024-06-03 18:30:23 -07:00
Elliot Gorokhovsky
be6a182006
Unit test for external sequence producer + static CCtx + streaming (#4063) 2024-06-03 12:42:27 -04:00
Elliot Gorokhovsky
949689facf Drop FreeBSD 13.2 CI 2024-06-03 08:36:07 -07:00
Yann Collet
f70fb7c870
Merge pull request #4046 from josepho0918/iar
Improve support for IAR compiler with attributes and intrinsics
2024-05-29 15:33:19 -07:00
Yann Collet
c5862f7731
Merge pull request #4054 from jbajic/fix-missing-newline
[fix] Add newline when file exceeds 128KB
2024-05-29 15:32:54 -07:00
Federico Maresca
5e9a6c2fe4
Refactor dictionary matchfinder index safety check (#4039) 2024-05-29 12:35:24 -04:00
Jure Bajic
4c6a519fdd [fix] Add newline when file exceeds 128KB 2024-05-26 11:34:24 +02:00
Yann Collet
0e2ceb2d50
Merge pull request #4050 from Adenilson/fix_legacy_nullptr01
[fix] Add check on failed allocation in legacy/zstd_v06
2024-05-21 10:30:45 -07:00
Adenilson Cavalcanti
1872688e0a [fix] Add check on failed allocation in legacy/zstd_v06
As reported by Ben Hawkes in #4026, a failure to allocate a zstd context
would lead to a dereference of a NULL pointer due to a missing check
on the returned result of ZSTDv06_createDCtx().

This patch fix the issue by adding a check for valid returned pointer.
2024-05-17 15:40:28 -07:00
Joseph Chen
5fadd8e6b1 revert FSE_readNCount_body attribute 2024-05-15 10:47:50 +08:00
Joseph Chen
2955d92ac0 Improve support for IAR compiler with attributes and intrinsics 2024-05-14 17:01:19 +08:00
Yann Collet
78955f5f9d
Merge pull request #4040 from facebook/dependabot/github_actions/msys2/setup-msys2-2.23.0
Bump msys2/setup-msys2 from 2.22.0 to 2.23.0
2024-05-13 09:15:07 -07:00
dependabot[bot]
4356192cb2
Bump msys2/setup-msys2 from 2.22.0 to 2.23.0
Bumps [msys2/setup-msys2](https://github.com/msys2/setup-msys2) from 2.22.0 to 2.23.0.
- [Release notes](https://github.com/msys2/setup-msys2/releases)
- [Changelog](https://github.com/msys2/setup-msys2/blob/main/CHANGELOG.md)
- [Commits](cc11e9188b...d0e80f58df)

---
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-05-13 05:18:11 +00:00
Richard Barnes
97291fc502 Increase x-compatibility 2024-04-29 09:19:24 -04:00
Richard Barnes
d7cb47036c Make zstd.h compatible with -Wzero-as-null-pointer-constant 2024-04-29 09:19:24 -04:00
Felix Handte
fe67503f84
Merge pull request #4029 from facebook/dependabot/github_actions/github/codeql-action-3.25.1
Bump github/codeql-action from 3.24.10 to 3.25.1
2024-04-26 08:39:39 -07:00
Yann Collet
f65dde9860
Merge pull request #4031 from facebook/docDStream
update documentation of ZSTD_decompressStream()
2024-04-25 14:11:32 -07:00
Yann Collet
a86f5f3f33 update documentation of ZSTD_decompressStream()
slightly more precise, by recommending to check the return value.
fix #4030
2024-04-23 09:31:35 -07:00
dependabot[bot]
68a6d9b9f6
Bump github/codeql-action from 3.24.10 to 3.25.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.10 to 3.25.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](4355270be1...c7f9125735)

---
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-04-22 05:20:46 +00:00
Yann Collet
ff7a151f2e update test name 2024-04-21 10:44:50 -07:00
Yann Collet
eb541403c4
Merge pull request #4025 from alexlnkp/dev
Fixed all memory leaks and almost all undefined behaviour
2024-04-21 10:14:33 -07:00
Yann Collet
1232d4c45d
Merge pull request #3931 from bgilbert/pthread
meson: don't add `-pthread` to static linking flags on Windows
2024-04-20 20:25:19 -07:00
Yann Collet
da797d0a43
Merge pull request #4019 from b7f7/fix_cmake_rc_build
fix missing include folder for resource compiler
2024-04-16 16:06:17 -07:00
Yann Collet
fb5a5e46a5
Merge pull request #4020 from Ansuel/install-mt-pc
Provide variant pkg-config file for multi-threaded static lib
2024-04-16 16:04:23 -07:00
Alex Murkoff
849b2ad907 removed freeing of the ptr 2024-04-14 20:44:12 +07:00
Alex Murkoff
0b24fc0a11 init out char array with all members as 0 x2 2024-04-14 17:57:53 +07:00
Alex Murkoff
b4ecf724b1 made initialize out char array with all elements set to 0
fixed where i made it to init with just the first one being set to 0
2024-04-14 17:45:53 +07:00
Alex Murkoff
75d0f66c87 reverted the addition of free at the gz_init() 2024-04-13 12:51:20 +07:00
Alex Murkoff
01cea2e1e2 fixed ISO C incompatibility
for good this time... probably
2024-04-13 02:37:13 +07:00
Alex Murkoff
4f41631aa4 fixed ISO C incompatibility 2024-04-13 02:35:32 +07:00
Alex Murkoff
1d5e9705db fixed memory leaks and almost all undefined behaviour 2024-04-13 02:24:14 +07:00
Felix Handte
592de19843
Merge pull request #4022 from facebook/dependabot/github_actions/github/codeql-action-3.24.10
Bump github/codeql-action from 3.24.9 to 3.24.10
2024-04-12 08:51:02 -07:00
Benjamin Gilbert
5be2a8721d meson: don't add -pthread to static linking flags on Windows
Meson always returns -pthread in dependency('threads') on non-MSVC
compilers.  On Windows we use Windows threading primitives, so we don't
need this.  Avoid adding -pthread to libzstd's link flags, either as a
Meson subproject or via pkg-config Libs.private, so the application
doesn't inadvertently depend on winpthreads.

Add a Meson MinGW cross-compile CI test that checks for this.  It turns
out that pzstd fails to build in that environment, so have the test
skip building contrib for now.
2024-04-11 01:27:24 +09:00
Yann Collet
9f42fa0a04
Merge pull request #4021 from pstef/dev
Fix zlibWrapper build
2024-04-09 11:02:49 -07:00
Christian Marangi
f1f1ae369a
Provide variant pkg-config file for multi-threaded static lib
Multi-threaded static library require -pthread to correctly link and works.
The pkg-config we provide tho only works with dynamic multi-threaded library
and won't provide the correct libs and cflags values if lib-mt is used.

To handle this, introduce an env variable MT to permit advanced user to
install and generate a correct pkg-config file for lib-mt or detect if
lib-mt target is called.

With MT env set on calling make install-pc, libzstd.pc.in is a
pkg-config file for a multi-threaded static library.

On calling make lib-mt, a libzstd.pc is generated for a multi-threaded
static library as it's what asked by the user by forcing it.

libzstd.pc is changed to PHONY to force regeneration of it on calling
lib targets or install-pc to handle case where the same directory is
used for mixed compilation.

This was notice while migrating from meson to make build system where
meson generates a correct .pc file while make doesn't.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-08 17:44:52 +02:00
dependabot[bot]
7968c661af
Bump github/codeql-action from 3.24.9 to 3.24.10
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.9 to 3.24.10.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](1b1aada464...4355270be1)

---
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-04-08 05:47:58 +00:00
Piotr Paweł Stefaniak
71def59890 Fix zlibWrapper build
Just after a clone I'm getting this:

~/zstd/zlibWrapper$ cc -c zstd_zlibwrapper.o gz*.c -lz -lzstd -DSTDC
gzwrite.c: In function ‘gz_write’:
gzwrite.c:226:43: error: ‘z_uInt’ undeclared (first use in this
                         function); did you mean ‘uInt’?
  226 |             state.state->strm.avail_in = (z_uInt)n;
      |                                           ^~~~~~
      |                                           uInt
gzwrite.c:226:43: note: each undeclared identifier is reported only
                        once for each function it appears in
gzwrite.c:226:50: error: expected ‘;’ before ‘n’
  226 |             state.state->strm.avail_in = (z_uInt)n;
      |                                                  ^
      |                                                  ;

z_uInt is never used directly, zconf.h redefines uInt to z_uInt under
the condition that Z_PREFIX is set. All examples use uInt, and the type
of avail_in is also uInt.

In this commit I modify the cast to refer to the same type as the type
of lvalue.

Arguably, the real fix here is to handle possible overflows, but that's
beyond the scope of this commit.
2024-04-07 13:04:26 +02:00
Yann Collet
87af5fb2df
Merge pull request #3996 from facebook/fix_nodejs_version_warning
fix nodejs deprecation warning
2024-04-05 23:06:21 -07:00
Yann Collet
6f7f59b232
Merge pull request #4012 from elasota/spec-remove-fse-overflow
Remove specification text stating that probability overflow is invalid
2024-04-05 23:06:06 -07:00
Yann Collet
3fd4f3bf04
Merge pull request #4011 from facebook/fix4005
decompression errors always display the full origin filename
2024-04-05 23:05:53 -07:00
BadWolf
fd5f8106a5 fix missing include folder for resource compiler 2024-04-06 00:05:58 +02:00
elasota
c54f4783d0 Specify that decoders may reject non-zero probabilities for larger offset codes than supported by the implementation 2024-04-01 20:13:48 -04:00
elasota
8cff66f2f5 Remove text specifying probability overflow as invalid, the variable-size value encoding scheme makes this impossible. 2024-04-01 20:08:42 -04:00
Yann Collet
a2f145f059 decompression errors always display the full origin filename
instead of the truncated size-limited version.
2024-04-01 11:49:21 -07:00
Yuriy Chernyshov
72c16b187d Fix building on windows-x86 if clang already includes
[D101338](https://reviews.llvm.org/D101338) landed in 2021, so clang16 should have it
2024-04-01 09:53:08 -07:00
Yann Collet
e3566d62ac
Merge pull request #3994 from sunpoet/dev
Use md5sum rather than gmd5sum for FreeBSD
2024-03-31 23:09:46 -07:00
Yann Collet
4b5a266d7b
Merge pull request #3997 from facebook/readme_bench_156
updated benchmarks for v1.5.6
2024-03-31 13:17:01 -07:00