]> git.ipfire.org Git - thirdparty/zstd.git/log
thirdparty/zstd.git
3 years agoFix required decompression memory usage reported by -vv + --long 3042/head
Jonathan McDowell [Tue, 1 Feb 2022 11:20:30 +0000 (03:20 -0800)] 
Fix required decompression memory usage reported by -vv + --long

The use of --long alters the window size internally in the underlying
library (lib/compress/zstd_compress.c:ZSTD_getCParamsFromCCtxParams),
which changes the memory required for decompression. This means that the
reported requirement from the zstd binary when -vv is specified is
incorrect.

A full fix for this would be to add an API call to be able to retrieve
the required decompression memory from the library, but as a
lighterweight fix we can just take account of the fact we've enabled
long mode and update our verbose output appropriately.

Fixes #2968

3 years agoTravis CI: fix by installing pip compatible with python 3.6 (#3041)
Yonatan Komornik [Tue, 1 Feb 2022 00:49:49 +0000 (16:49 -0800)] 
Travis CI: fix by installing pip compatible with python 3.6 (#3041)

Pip install script no longer supports python3.6 by default, switched to a script that does.

3 years agoAsyncIO compression part 2 - added async read and asyncio to compression code (#3022)
Yonatan Komornik [Mon, 31 Jan 2022 23:43:41 +0000 (15:43 -0800)] 
AsyncIO compression part 2 - added async read and asyncio to compression code (#3022)

* Compression asyncio:
- Added asyncio functionality for compression flow
- Added ReadPool for async reads, implemented in both comp and decomp flows

3 years agoMerge pull request #3020 from terrelln/cli-tests
Nick Terrell [Mon, 31 Jan 2022 18:02:27 +0000 (10:02 -0800)] 
Merge pull request #3020 from terrelln/cli-tests

Add new CLI testing platform

3 years agoFix static analysis false-positives 3020/head
Nick Terrell [Sun, 30 Jan 2022 20:16:16 +0000 (12:16 -0800)] 
Fix static analysis false-positives

* It couldn't detect that the `fastCoverParams` can't be non-null, since it was just an assertion.
* It thought we were accesing `wksp->dtable` beyond the bounds because we were using it to set the `workSpace` value. Instead, compute the workspace size used in a different way.

3 years agoMerge pull request #3027 from brailovich/dev
Yann Collet [Sat, 29 Jan 2022 23:40:43 +0000 (15:40 -0800)] 
Merge pull request #3027 from brailovich/dev

fix for -r on empty directory

3 years agoMerge pull request #3030 from terrelln/verbose-version
Yann Collet [Sat, 29 Jan 2022 23:40:09 +0000 (15:40 -0800)] 
Merge pull request #3030 from terrelln/verbose-version

Print zlib/lz4/lzma library versions in verbose version output

3 years agominor refactor to blocksplit
Yann Collet [Thu, 27 Jan 2022 19:06:16 +0000 (11:06 -0800)] 
minor refactor to blocksplit

notably simplication of ZSTD_deriveSeqStoreChunk()

3 years agoMerge pull request #3034 from facebook/fix44122
Yann Collet [Fri, 28 Jan 2022 00:01:39 +0000 (16:01 -0800)] 
Merge pull request #3034 from facebook/fix44122

fix 44122 test error

3 years agofix 44122 test error 3034/head
Yann Collet [Thu, 27 Jan 2022 22:54:18 +0000 (14:54 -0800)] 
fix 44122 test error

It's a bug in the test itself, in exceptional circumstances (no more space for additional sequence).

There should be enough room for all cases to work fine from now on,
and if not, we have an additional `assert()` to catch that situation.

3 years ago[CI] Hook cli-tests up to CI
Nick Terrell [Mon, 24 Jan 2022 21:52:08 +0000 (13:52 -0800)] 
[CI] Hook cli-tests up to CI

Add cli-tests to `make test`. This adds a `python3` dependency to `make
test`, but not `make check`. We could make this dependency optional by
skipping the tests if `python3` is not present.

3 years ago[test] Add new CLI testing platform
Nick Terrell [Tue, 18 Jan 2022 21:31:27 +0000 (13:31 -0800)] 
[test] Add new CLI testing platform

Adds the new CLI testing platform that I'm proposing.
See the added `README.md` for details.

3 years ago[datagen] Remove extra newline printed
Nick Terrell [Fri, 21 Jan 2022 06:46:45 +0000 (22:46 -0800)] 
[datagen] Remove extra newline printed

`datagen` was printing a `\n` even when it had no other output. Raise
the output level for the final `\n` to the minimum output level used.

This minor bug was caught by the new testing framework.

3 years ago[zstdcli] Fix option detection for --auto-threads
Nick Terrell [Fri, 21 Jan 2022 06:45:03 +0000 (22:45 -0800)] 
[zstdcli] Fix option detection for --auto-threads

The option `--auto-threads` should still be accepted and parsed, even if
`ZSTD_MULTITHREAD` is not defined. It doesn't mean anything, but we
should still accept the option. Since we want scripts to be able to work
generically.

This bug was caught by tests I added to the new testing framework.

3 years ago[dibio] Fix assertion triggered by no inputs
Nick Terrell [Fri, 21 Jan 2022 06:41:47 +0000 (22:41 -0800)] 
[dibio] Fix assertion triggered by no inputs

Passing 0 inputs to `DiB_shuffle()` caused an assertion failure where
it should just return.

A test is added in a later commit, with the initial introduction of the
new testing framework.

Fixes #3007.

3 years agoMerge pull request #3033 from facebook/fix44108
Yann Collet [Thu, 27 Jan 2022 18:57:48 +0000 (10:57 -0800)] 
Merge pull request #3033 from facebook/fix44108

fix issue 44108

3 years agoUpdate playTests.sh 3027/head
brailovich [Thu, 27 Jan 2022 16:22:05 +0000 (08:22 -0800)] 
Update playTests.sh

combination of -r with empty folder simplified to comply with sh compatibility tests

3 years agoMerge pull request #2974 from facebook/fix2966_part3
Yann Collet [Thu, 27 Jan 2022 14:14:04 +0000 (06:14 -0800)] 
Merge pull request #2974 from facebook/fix2966_part3

Lazy parameters adaptation (part 1 - ZSTD_c_stableInBuffer)

3 years agofix issue 44108 3033/head
Yann Collet [Thu, 27 Jan 2022 13:13:45 +0000 (05:13 -0800)] 
fix issue 44108

credit to oss-fuzz

In rare circumstances, the block-splitter might cut a block at the exact beginning of a repcode.
In which case, since litlength=0, if the repcode expected 1+ literals in front, its signification changes.
This scenario is controlled in ZSTD_seqStore_resolveOffCodes(),
and the repcode is transformed into a raw offset when its new meaning is incorrect.

In more complex scenarios, the previous block might be emitted as uncompressed after all,
thus modifying the expected repcode history.
In the case discovered by oss-fuzz, the first block is emitted as uncompressed,
so the repcode history remains at default values: 1,4,8.

But since the starting repcode is repcode3, and the literal length is == 0,
its meaning is : = repcode1 - 1.
Since repcode1==1, it results in an offset value of 0, which is invalid.

So that's what the `assert()` was verifying : the result of the repcode translation should be a valid offset.

But actually, it doesn't matter, because this result will then be compared to reality,
and since it's an invalid offset, it will necessarily be discarded if incorrect,
then the repcode will be replaced by a raw offset.

So the `assert()` is not useful.
Furthermore, it's incorrect, because it assumes this situation cannot happen, but it does, as described in above scenario.

3 years agoUpdate playTests.sh
brailovich [Thu, 27 Jan 2022 02:56:52 +0000 (18:56 -0800)] 
Update playTests.sh

3 years agomore usage of new error code stabilityCondition_notRespected 2974/head
Yann Collet [Thu, 27 Jan 2022 02:04:52 +0000 (18:04 -0800)] 
more usage of new error code stabilityCondition_notRespected

as suggested by @terrelln

3 years agoPrint zlib/lz4/lzma library versions in verbose version output 3030/head
Nick Terrell [Thu, 27 Jan 2022 01:55:26 +0000 (17:55 -0800)] 
Print zlib/lz4/lzma library versions in verbose version output

Knowing the version of zlib/lz4/lzma we're linking against is very
useful for debugging issues with those libraries, so print it out in the
verbosity 4 version output.

Also print this information at the top of `playTests.sh`.

3 years agoMerge pull request #3019 from facebook/huf_traces
Yann Collet [Thu, 27 Jan 2022 02:02:05 +0000 (18:02 -0800)] 
Merge pull request #3019 from facebook/huf_traces

More traces to improved debugging of literals compression

3 years agoUpdate playTests.sh
brailovich [Thu, 27 Jan 2022 00:53:11 +0000 (16:53 -0800)] 
Update playTests.sh

3 years agoUpdate zstdcli.c
brailovich [Thu, 27 Jan 2022 00:51:18 +0000 (16:51 -0800)] 
Update zstdcli.c

3 years agoremoved new huffman depth heuristic 3019/head
Yann Collet [Wed, 26 Jan 2022 23:22:06 +0000 (15:22 -0800)] 
removed new huffman depth heuristic

results are now identical to before this PR

3 years agointroduced LitHufLog constant
Yann Collet [Sat, 22 Jan 2022 01:13:33 +0000 (17:13 -0800)] 
introduced LitHufLog constant

which properly represents the maximum bit size of compressed literals (11) as defined in the specification.

To be preferred from HUF_TABLELOG_DEFAULT which represents the same value but by accident.

Name selected to keep the same convention as existing width definitions,
MLFSELog, LLFSELog and OffFSELog.

3 years agorenamed HufLog into ZSTD_HUFFDTABLE_CAPACITY_LOG
Yann Collet [Sat, 22 Jan 2022 01:03:48 +0000 (17:03 -0800)] 
renamed HufLog into ZSTD_HUFFDTABLE_CAPACITY_LOG

old name was not descriptive and actually misleading

3 years agomoved HufLog to lib/decompress
Yann Collet [Sat, 22 Jan 2022 00:40:30 +0000 (16:40 -0800)] 
moved HufLog to lib/decompress

it's only used to size decompression tables

3 years agoonly declare debug functions in debug mode
Yann Collet [Sat, 22 Jan 2022 00:14:25 +0000 (16:14 -0800)] 
only declare debug functions in debug mode

3 years agoproper max limit to 11
Yann Collet [Fri, 21 Jan 2022 06:19:35 +0000 (22:19 -0800)] 
proper max limit to 11

3 years agoupdate regression tests
Yann Collet [Fri, 21 Jan 2022 05:59:46 +0000 (21:59 -0800)] 
update regression tests

minor compression ratio benefits in some cases,
no compression ratio regression in the measured scenarios.

3 years agoimproved compression of literals in specific corner cases
Yann Collet [Fri, 21 Jan 2022 05:24:33 +0000 (21:24 -0800)] 
improved compression of literals in specific corner cases

In rare cases, the default huffman depth selector is a bit too harsh,
requiring brutal adaptations to the tree,
resulting is some loss of compression ratio.
This new heuristic avoids the worse cases, favoring compression ratio.

As an example, compression of a specific distribution of 771 literals
is now improved to 441 bytes, from 601 bytes before.

3 years agoadding traces to better track processing of literals
Yann Collet [Fri, 21 Jan 2022 05:23:48 +0000 (21:23 -0800)] 
adding traces to better track processing of literals

3 years agoMerge pull request #3023 from facebook/fix_seqCompress_withDelimiter
Yann Collet [Wed, 26 Jan 2022 22:15:28 +0000 (14:15 -0800)] 
Merge pull request #3023 from facebook/fix_seqCompress_withDelimiter

fix sequence compression API in Explicit Delimiter mode

3 years agoadded ZSTD_compressStream2() + ZSTD_c_stableInBuffer test
Yann Collet [Wed, 26 Jan 2022 21:33:04 +0000 (13:33 -0800)] 
added ZSTD_compressStream2() + ZSTD_c_stableInBuffer test

3 years agoadded helper function inBuffer_forEndFlush()
Yann Collet [Wed, 26 Jan 2022 19:05:57 +0000 (11:05 -0800)] 
added helper function inBuffer_forEndFlush()

3 years agoconverted checks into user validation generating error codes
Yann Collet [Wed, 26 Jan 2022 18:43:50 +0000 (10:43 -0800)] 
converted checks into user validation generating error codes

had to create a new error code for this condition,
none of the existing ones were fitting enough.

3 years agoadded streaming test starting from non-0 pos
Yann Collet [Wed, 26 Jan 2022 18:30:33 +0000 (10:30 -0800)] 
added streaming test starting from non-0 pos

3 years agofix extended case combining stableInBuffer with continue() and flush() modes
Yann Collet [Tue, 25 Jan 2022 06:57:55 +0000 (22:57 -0800)] 
fix extended case combining stableInBuffer with continue() and flush() modes

3 years agobetter consistency in accessing @input
Yann Collet [Mon, 24 Jan 2022 22:45:22 +0000 (14:45 -0800)] 
better consistency in accessing @input

as suggested by @terrelln.

Also : commented zstreamtest more
to ensure ZSTD_stableInBuffer is tested/

3 years agopretend consuming input to provide a sense of forward progress
Yann Collet [Thu, 6 Jan 2022 00:34:10 +0000 (16:34 -0800)] 
pretend consuming input to provide a sense of forward progress

3 years agofixed incorrect comment
Yann Collet [Wed, 5 Jan 2022 21:21:43 +0000 (13:21 -0800)] 
fixed incorrect comment

3 years agominor behavior refinements
Yann Collet [Mon, 3 Jan 2022 04:06:46 +0000 (20:06 -0800)] 
minor behavior refinements

specifically, there is no obligation to start streaming compression with pos=0.
stableSrc mode is now compatible with this setup.

3 years agomake stableSrc compatible with regular streaming API
Yann Collet [Sun, 2 Jan 2022 07:15:34 +0000 (23:15 -0800)] 
make stableSrc compatible with regular streaming API

including flushStream().

Now the only condition is for `input.size` to continuously grow.

3 years agostreaming compression : lazy parameter adaptation with stable input
Yann Collet [Sat, 1 Jan 2022 02:20:36 +0000 (18:20 -0800)] 
streaming compression : lazy parameter adaptation with stable input

effectively makes ZSTD_c_stableInput compatible ZSTD_compressStream()
and zstd_e_continue operation mode.

3 years agominor refactoring
Yann Collet [Sat, 1 Jan 2022 00:25:12 +0000 (16:25 -0800)] 
minor refactoring

on streaming compression implementation.

3 years agorefactored fuzzer tests for sequence compression api 3023/head
Yann Collet [Mon, 24 Jan 2022 06:08:20 +0000 (22:08 -0800)] 
refactored fuzzer tests for sequence compression api

add explicit delimiter mode to libfuzzer test

3 years agofix sequence compression API in Explicit Delimiter mode
Yann Collet [Sat, 22 Jan 2022 10:30:08 +0000 (02:30 -0800)] 
fix sequence compression API in Explicit Delimiter mode

3 years agoMerge pull request #1 from brailovich/brailovich-patch-1
brailovich [Tue, 25 Jan 2022 01:54:41 +0000 (17:54 -0800)] 
Merge pull request #1 from brailovich/brailovich-patch-1

fix for error message in recursive mode for an empty folder

3 years agofix for error message in recursive mode for an empty folder
brailovich [Tue, 25 Jan 2022 01:42:21 +0000 (17:42 -0800)] 
fix for error message in recursive mode for an empty folder

-r on empty directory resulted in zstd waiting input from stdin. now zstd exits without error and prints a warning message explaining why no processing happened (no files or directories to process).

3 years agoMerge pull request #2965 from facebook/offbase
Yann Collet [Mon, 24 Jan 2022 23:47:42 +0000 (15:47 -0800)] 
Merge pull request #2965 from facebook/offbase

Converge sumtype (offset | repcode) numeric representation towards offBase

3 years agoAsyncIO compression part 1 - refactor of existing asyncio code (#3021)
Yonatan Komornik [Mon, 24 Jan 2022 22:43:02 +0000 (14:43 -0800)] 
AsyncIO compression part 1 - refactor of existing asyncio code (#3021)

* Refactored fileio.c:
- Extracted asyncio code to fileio_asyncio.c/.h
- Moved type definitions to fileio_types.h
- Moved common macro definitions needed by both fileio.c and fileio_asyncio.c to fileio_common.h

* Bugfix - rename fileio_asycio to fileio_asyncio

* Added copyrights & license to new files

* CR fixes

3 years agoMerge pull request #3026 from trixirt/from-linux-fix
Nick Terrell [Mon, 24 Jan 2022 22:31:16 +0000 (14:31 -0800)] 
Merge pull request #3026 from trixirt/from-linux-fix

cleanup double word in comment.

3 years agocleanup double word in comment. 3026/head
Tom Rix [Mon, 24 Jan 2022 20:43:39 +0000 (12:43 -0800)] 
cleanup double word in comment.

Remove the second 'a' and 'into'

Signed-off-by: Tom Rix <trix@redhat.com>
3 years agoslightly shortened status and summary lines in very verbose mode
Yann Collet [Sat, 22 Jan 2022 05:38:35 +0000 (21:38 -0800)] 
slightly shortened status and summary lines in very verbose mode

3 years agoChange zstdless behavior to align with zless (#2909)
binhdvo [Sat, 22 Jan 2022 00:57:19 +0000 (19:57 -0500)] 
Change zstdless behavior to align with zless (#2909)

* Change zstdless behavior to align with zless

3 years agoMerge pull request #3005 from cwoffenden/faster-amalgamate
Yann Collet [Sat, 22 Jan 2022 00:12:22 +0000 (16:12 -0800)] 
Merge pull request #3005 from cwoffenden/faster-amalgamate

Use faster Python script to amalgamate

3 years agoslightly shortened compression status update line
Yann Collet [Fri, 21 Jan 2022 22:08:46 +0000 (14:08 -0800)] 
slightly shortened compression status update line

to fit within 80 columns limit.

3 years agoMerge pull request #2985 from yoniko/zstd-output-file-buffer
Yonatan Komornik [Fri, 21 Jan 2022 21:57:05 +0000 (13:57 -0800)] 
Merge pull request #2985 from yoniko/zstd-output-file-buffer

ZSTD CLI: Use buffered output

3 years agoAsync write for decompression (#2975)
Yonatan Komornik [Fri, 21 Jan 2022 21:55:41 +0000 (13:55 -0800)] 
Async write for decompression (#2975)

* Async IO decompression:
- Added --[no-]asyncio flag for CLI decompression.
- Replaced dstBuffer in decompression with a pool of write jobs.
- Added an ability to execute write jobs in a separate thread.
- Added an ability to wait (join) on all jobs in a thread pool (queued and running).

3 years agoMerge pull request #3013 from WojciechMula/simplify-asm
Nick Terrell [Fri, 21 Jan 2022 19:13:40 +0000 (11:13 -0800)] 
Merge pull request #3013 from WojciechMula/simplify-asm

Simplify HUF_decompress4X2_usingDTable_internal_bmi2_asm_loop

3 years agoMerge pull request #3018 from felixhandte/gh-action-release-artifacts-trigger-fix
Felix Handte [Fri, 21 Jan 2022 02:08:59 +0000 (21:08 -0500)] 
Merge pull request #3018 from felixhandte/gh-action-release-artifacts-trigger-fix

Trigger Release Artifact Generation on Publish

3 years agoMerge pull request #2983 from facebook/minLitPricev2
Yann Collet [Fri, 21 Jan 2022 00:02:31 +0000 (16:02 -0800)] 
Merge pull request #2983 from facebook/minLitPricev2

[opt] minor compression ratio improvement

3 years agoTrigger Release Artifact Generation on Publish 3018/head
W. Felix Handte [Thu, 20 Jan 2022 22:36:28 +0000 (17:36 -0500)] 
Trigger Release Artifact Generation on Publish

We previously triggered release artifact generation on release creation. We
sometimes observed that the action failed to run. I hypothesized that we were
hitting rate limiting or something. I just stumbled across [this documentat-
ion](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release), which says:

> Note: Workflows are not triggered for the `created`, `edited`, or `deleted`
> activity types for draft releases. When you create your release through the
> GitHub browser UI, your release may automatically be saved as a draft.

This must have been what was happening. This commit therefore changes the
trigger to the `published` activity. This should be more reliable.

This does have the unfortunate side effect that artifacts won't be generated
or attached until *after* the release has been published, which is what I was
trying to avoid by using the `created` activity. Oh well.

3 years agoMerge pull request #3015 from felixhandte/enable-cet-test-illegal-instruction
Felix Handte [Thu, 20 Jan 2022 21:18:42 +0000 (16:18 -0500)] 
Merge pull request #3015 from felixhandte/enable-cet-test-illegal-instruction

Add GitHub Action Checking that Zstd Runs Successfully Under CET

3 years agoMerge pull request #3016 from embg/macro_lint
Elliot Gorokhovsky [Thu, 20 Jan 2022 20:05:02 +0000 (13:05 -0700)] 
Merge pull request #3016 from embg/macro_lint

Minor lint fix

3 years agoMerge pull request #2994 from hjl-tools/hjl/cet-report/dev
Felix Handte [Thu, 20 Jan 2022 19:58:13 +0000 (14:58 -0500)] 
Merge pull request #2994 from hjl-tools/hjl/cet-report/dev

x86: Append -z cet-report=error to LDFLAGS

3 years agoMinor lint fix 3016/head
Elliot Gorokhovsky [Thu, 20 Jan 2022 18:46:09 +0000 (11:46 -0700)] 
Minor lint fix

3 years agox86: Append -z cet-report=error to LDFLAGS 2994/head
H.J. Lu [Tue, 11 Jan 2022 18:36:44 +0000 (10:36 -0800)] 
x86: Append -z cet-report=error to LDFLAGS

Append -z cet-report=error to LDFLAGS if -fcf-protection is enabled by
default in compiler to catch the missing Intel CET marker:

compiling multi-threaded dynamic library 1.5.1
/usr/local/bin/ld: obj/conf_f408b4c825de923ffc88f7f21b6884b1/dynamic/huf_decompress_amd64.o: error: missing IBT and SHSTK properties
collect2: error: ld returned 1 exit status
...
LINK obj/conf_dbc0b41e36c44111bb0bb918e093d7c1/zstd
/usr/local/bin/ld: obj/conf_dbc0b41e36c44111bb0bb918e093d7c1/huf_decompress_amd64.o: error: missing IBT and SHSTK properties
collect2: error: ld returned 1 exit status

3 years agoAdd GitHub Action Checking that Zstd Runs Successfully Under CET 3015/head
W. Felix Handte [Wed, 12 Jan 2022 19:02:27 +0000 (14:02 -0500)] 
Add GitHub Action Checking that Zstd Runs Successfully Under CET

3 years agoMerge pull request #2992 from hjl-tools/hjl/cet/dev
Felix Handte [Thu, 20 Jan 2022 16:24:47 +0000 (11:24 -0500)] 
Merge pull request #2992 from hjl-tools/hjl/cet/dev

x86-64: Enable Intel CET

3 years agoMore descriptive exclusion error; updated docs and copyright 3005/head
Carl Woffenden [Thu, 20 Jan 2022 13:50:31 +0000 (14:50 +0100)] 
More descriptive exclusion error; updated docs and copyright

3 years agoSimplify HUF_decompress4X2_usingDTable_internal_bmi2_asm_loop 3013/head
Wojciech Muła [Wed, 19 Jan 2022 17:29:54 +0000 (18:29 +0100)] 
Simplify HUF_decompress4X2_usingDTable_internal_bmi2_asm_loop

Get rid of three divisions. The original expression was:

    opmin := min((oend0 - op0) / 10, (oend1 - op1) / 10, (oend2 - op2) / 10, (oend3 - op3) / 10)
    r15   := min(r15, opmin)

The division by 10 can be moved outside the `min`:

    opmin := min(oend0 - op0, oend1 - op1, oend2 - op2, oend3 - op3)
    r15   := min(r15, opmin/10)

3 years agoTypo (and missing commit)
Carl Woffenden [Wed, 19 Jan 2022 17:05:35 +0000 (18:05 +0100)] 
Typo (and missing commit)

3 years agoMerge pull request #2999 from embg/ci_instructions_update 2995/head
Elliot Gorokhovsky [Wed, 19 Jan 2022 17:03:07 +0000 (10:03 -0700)] 
Merge pull request #2999 from embg/ci_instructions_update

Update CI documentation

3 years agoUpdate CI documentation 2999/head
Elliot Gorokhovsky [Fri, 14 Jan 2022 22:38:48 +0000 (15:38 -0700)] 
Update CI documentation

3 years agoSuggestion from code review
Carl Woffenden [Wed, 19 Jan 2022 16:48:10 +0000 (17:48 +0100)] 
Suggestion from code review

3 years agoPython style change
Carl Woffenden [Wed, 19 Jan 2022 16:33:20 +0000 (17:33 +0100)] 
Python style change

Co-authored-by: Alexandre Bury <alexandre.bury@gmail.com>
3 years agoFixed bugs found in other projects
Carl Woffenden [Wed, 19 Jan 2022 15:56:03 +0000 (16:56 +0100)] 
Fixed bugs found in other projects

When testing amalgamating other projects it was found: invalid Unicode errors were tripping Python's text IO, and the header search order appears differs from the shell version.

3 years agoUpdated README
Carl Woffenden [Wed, 19 Jan 2022 14:57:33 +0000 (15:57 +0100)] 
Updated README

3 years agoTest and tidy
Carl Woffenden [Wed, 19 Jan 2022 10:32:53 +0000 (11:32 +0100)] 
Test and tidy

Made the Python more Python-like. Added notes and general tidy. Tested exclusions and building with various options. Tested all scripts.

3 years agoMerge pull request #3009 from terrelln/asm-flags
Nick Terrell [Tue, 18 Jan 2022 23:48:11 +0000 (15:48 -0800)] 
Merge pull request #3009 from terrelln/asm-flags

[build][asm] Pass ASFLAGS to the assembler instead of CFLAGS

3 years agoMerge pull request #2998 from floppym/issue2997
Nick Terrell [Tue, 18 Jan 2022 23:14:06 +0000 (15:14 -0800)] 
Merge pull request #2998 from floppym/issue2997

Avoid updating timestamps when the destination is stdout

3 years ago[build][asm] Pass ASFLAGS to the assembler instead of CFLAGS 3009/head
Nick Terrell [Tue, 18 Jan 2022 22:28:43 +0000 (14:28 -0800)] 
[build][asm] Pass ASFLAGS to the assembler instead of CFLAGS

* Add `-Wa,--noexecstack` to both `ASFLAGS` and `CFLAGS`
* Pass `ASFLAGS` to `.S` compilation instead of `CFLAGS`

Fixes #3006.

3 years agoFeature parity with original shell script; needs further testing
Carl Woffenden [Tue, 18 Jan 2022 18:07:18 +0000 (19:07 +0100)] 
Feature parity with original shell script; needs further testing

3 years agoMerge pull request #3000 from embg/mt_memory_readability
Elliot Gorokhovsky [Tue, 18 Jan 2022 17:18:01 +0000 (10:18 -0700)] 
Merge pull request #3000 from embg/mt_memory_readability

Documentation and minor refactor to clarify MT memory management

3 years agoDocumentation and minor refactor to clarify MT memory management. 3000/head
Elliot Gorokhovsky [Fri, 14 Jan 2022 18:11:41 +0000 (11:11 -0700)] 
Documentation and minor refactor to clarify MT memory management.

3 years agoWork-in-progress; annotated types, added docs, parsed and resolved excluded files
Carl Woffenden [Tue, 18 Jan 2022 10:43:01 +0000 (11:43 +0100)] 
Work-in-progress; annotated types, added docs, parsed and resolved excluded files

3 years agoUsing faster Python script to amalgamate
Carl Woffenden [Mon, 17 Jan 2022 17:59:54 +0000 (18:59 +0100)] 
Using faster Python script to amalgamate

3 years agoMerge branch 'facebook:dev' into hjl/cet/dev 2992/head
hjl-tools [Sun, 16 Jan 2022 18:07:32 +0000 (10:07 -0800)] 
Merge branch 'facebook:dev' into hjl/cet/dev

3 years agoAvoid updating timestamps when the destination is stdout 2998/head
Mike Gilbert [Thu, 13 Jan 2022 21:47:18 +0000 (16:47 -0500)] 
Avoid updating timestamps when the destination is stdout

Fixes: 9cd6c1ff4d56fc74a2cbdfd9bcc82a64e0fe4bb7
Fixes: https://github.com/facebook/zstd/issues/2997
3 years agoMerge pull request #2987 from felixhandte/prepare-v1.5.2
Felix Handte [Tue, 11 Jan 2022 22:47:39 +0000 (17:47 -0500)] 
Merge pull request #2987 from felixhandte/prepare-v1.5.2

Prepare v1.5.2

3 years agox86-64: Enable Intel CET
H.J. Lu [Tue, 11 Jan 2022 15:28:25 +0000 (07:28 -0800)] 
x86-64: Enable Intel CET

Intel Control-flow Enforcement Technology (CET):

https://en.wikipedia.org/wiki/Control-flow_integrity#Intel_Control-flow_Enforcement_Technology

requires that on Linux, all linker input files are marked as CET enabled
in .note.gnu.property section.  For high-level language source codes,
.note.gnu.property section is added by compiler with the -fcf-protection
option.  For assembly sources, include <cet.h> to add .note.gnu.property
section.

3 years agoMerge pull request #2993 from hjl-tools/hjl/asm/dev
Felix Handte [Tue, 11 Jan 2022 19:31:51 +0000 (14:31 -0500)] 
Merge pull request #2993 from hjl-tools/hjl/asm/dev

x86-64: Hide internal assembly functions

3 years agoMerge pull request #2957 from hmaarrfk/fix_cmake_msvc
Felix Handte [Tue, 11 Jan 2022 18:25:16 +0000 (13:25 -0500)] 
Merge pull request #2957 from hmaarrfk/fix_cmake_msvc

Fixup MSVC source file inclusion for cmake builds

3 years agoMerge pull request #2956 from sunwire/fix-tar-test-cases
Yann Collet [Tue, 11 Jan 2022 18:16:34 +0000 (10:16 -0800)] 
Merge pull request #2956 from sunwire/fix-tar-test-cases

Fix tar test cases

3 years agoMerge pull request #2982 from terrelln/decompress-progress-0
Yann Collet [Tue, 11 Jan 2022 18:15:15 +0000 (10:15 -0800)] 
Merge pull request #2982 from terrelln/decompress-progress-0

Fix stderr progress logging for decompression

3 years agox86-64: Hide internal assembly functions 2993/head
H.J. Lu [Tue, 11 Jan 2022 16:09:58 +0000 (08:09 -0800)] 
x86-64: Hide internal assembly functions

Hide x86-64 internal assembly functions. Before

$ nm -D lib/libzstd.so.1 | grep usingDTable_internal_bmi2_asm_loop
00000000000c23c0 T _HUF_decompress4X1_usingDTable_internal_bmi2_asm_loop
00000000000c23c0 T HUF_decompress4X1_usingDTable_internal_bmi2_asm_loop
00000000000c283d T _HUF_decompress4X2_usingDTable_internal_bmi2_asm_loop
00000000000c283d T HUF_decompress4X2_usingDTable_internal_bmi2_asm_loop
$

After

$ nm -D lib/libzstd.so.1 | grep usingDTable_internal_bmi2_asm_loop
$

This fixes issue #2990.

3 years agoUpdate Changelog 2987/head
W. Felix Handte [Wed, 5 Jan 2022 23:41:14 +0000 (18:41 -0500)] 
Update Changelog