]> git.ipfire.org Git - thirdparty/zstd.git/log
thirdparty/zstd.git
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 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 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 #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

3 years agoZSTD CLI: Use buffered output for improved performance 2985/head
Yonatan Komornik [Fri, 7 Jan 2022 23:55:19 +0000 (15:55 -0800)] 
ZSTD CLI: Use buffered output for improved performance

3 years agoFix stderr progress logging for decompression 2982/head
Nick Terrell [Fri, 7 Jan 2022 23:09:56 +0000 (15:09 -0800)] 
Fix stderr progress logging for decompression

When decompressing with `-q` and an output file, the progress bar was mistakenly printed. This is a minimal fix, with a larger refactor to be stacked on top of it.

Fixes #2967.

3 years agoupdated regression results 2983/head
Yann Collet [Fri, 7 Jan 2022 23:08:06 +0000 (15:08 -0800)] 
updated regression results

3 years agonew Formulation
Yann Collet [Fri, 7 Jan 2022 22:37:53 +0000 (14:37 -0800)] 
new Formulation

presumes faster

3 years agoenforce a minimum price of 1 bit per literal in the optimal parser
Yann Collet [Fri, 7 Jan 2022 21:51:28 +0000 (13:51 -0800)] 
enforce a minimum price of 1 bit per literal in the optimal parser

3 years agoUpdate Docs
W. Felix Handte [Wed, 5 Jan 2022 21:59:07 +0000 (16:59 -0500)] 
Update Docs

3 years agoBump Version Number to 1.5.2
W. Felix Handte [Wed, 5 Jan 2022 21:56:24 +0000 (16:56 -0500)] 
Bump Version Number to 1.5.2

3 years agoMerge pull request #2981 from terrelln/asm-license
Nick Terrell [Fri, 7 Jan 2022 19:06:30 +0000 (11:06 -0800)] 
Merge pull request #2981 from terrelln/asm-license

[license] Fix license header of huf_decompress_amd64.S

3 years ago[license] Fix license header of huf_decompress_amd64.S 2981/head
Nick Terrell [Fri, 7 Jan 2022 17:35:27 +0000 (09:35 -0800)] 
[license] Fix license header of huf_decompress_amd64.S

* Add the license header for `huf_decompress_amd64.S`
* Add `.S` files to the `test-license.py` test

3 years agoMerge pull request #2980 from terrelln/opt-oss-fuzz-fix
Nick Terrell [Fri, 7 Jan 2022 17:27:09 +0000 (09:27 -0800)] 
Merge pull request #2980 from terrelln/opt-oss-fuzz-fix

[opt] Fix oss-fuzz bug in optimal parser

3 years agoMerge pull request #2977 from felixhandte/fix-2950
Felix Handte [Fri, 7 Jan 2022 17:10:46 +0000 (12:10 -0500)] 
Merge pull request #2977 from felixhandte/fix-2950

Remove Dependencies to Allow the Zstd Binary to Dynamically Link to the Library

3 years ago[opt] Fix oss-fuzz bug in optimal parser 2980/head
Nick Terrell [Fri, 7 Jan 2022 00:00:02 +0000 (16:00 -0800)] 
[opt] Fix oss-fuzz bug in optimal parser

oss-fuzz uncovered a scenario where we're evaluating the cost of litLength = 131072,
which can't be represented in the zstd format, so we accessed 1 beyond LL_bits.

Fix the issue by making it cost 1 bit more than litLength = 131071.

There are still follow ups:
1. This happened because literals_cost[0] = 0, so the optimal parser chose 36 literals
   over a match. Should we bound literals_cost[literal] > 0, unless the block truly only
   has one literal value?
2. When no matches are found, the cost model isn't updated. In this case no matches were
   found for an entire block. So the literals cost model wasn't updated at all. That made
   the optimal parser think literals_cost[0] = 0, where it is actually quite high, since
   the block was entirely random noise.

Credit to OSS-Fuzz.

3 years agoAvoid xxHash Dependency by Inlining 2977/head
W. Felix Handte [Thu, 6 Jan 2022 05:20:49 +0000 (00:20 -0500)] 
Avoid xxHash Dependency by Inlining

xxHash symbols are present in `libzstd.so`, but they are local and therefore
unavailable outside the lib. There are two possible solutions to the problem.
We could make those symbols global, or we could remove the dependency.

This commit chooses the latter approach. I suppose this comes at the cost of
code size / build time. I'm open to comments on whether this is a good thing
to do, especially since this will apply even when we are statically linking
everything.

3 years agoRemove Unused Include
W. Felix Handte [Thu, 6 Jan 2022 05:20:05 +0000 (00:20 -0500)] 
Remove Unused Include

3 years agoMerge pull request #2953 from felixhandte/modulemap-improvements
Felix Handte [Thu, 6 Jan 2022 04:54:50 +0000 (23:54 -0500)] 
Merge pull request #2953 from felixhandte/modulemap-improvements

Improve Module Map File

3 years agoAdd a compile option to explicitely disable assembly 2957/head
Mark Harfouche [Thu, 6 Jan 2022 01:36:51 +0000 (20:36 -0500)] 
Add a compile option to explicitely disable assembly

3 years agoUpdate the Swift Package Definition to Reflect Move 2953/head
W. Felix Handte [Thu, 23 Dec 2021 20:01:57 +0000 (15:01 -0500)] 
Update the Swift Package Definition to Reflect Move

3 years agoImprove Module Map File
W. Felix Handte [Thu, 23 Dec 2021 19:57:16 +0000 (14:57 -0500)] 
Improve Module Map File

This commit makes several changes:

1. It adds modules for the dictionary builder and errors headers.
2. It captures all of the macros that are used to configure these headers.
   When the headers are imported as modules and one of these macros is defined
   the compiler issues a warning that it needs to be defined on the CLI.
3. It promotes the modulemap file into the root of the lib directory.
   Experimentation shows that clang's `-fimplicit-module-maps` will find the
   modulemap when placed here, but not when it's put in a subdirectory.

3 years agoMerge pull request #2964 from felixhandte/noexecstack-all-archs
Felix Handte [Wed, 5 Jan 2022 21:52:39 +0000 (16:52 -0500)] 
Merge pull request #2964 from felixhandte/noexecstack-all-archs

Mark Huffman Decoder Assembly `noexecstack` on All Architectures

3 years agoClean Up Debugging Statements 2964/head
W. Felix Handte [Wed, 5 Jan 2022 20:21:48 +0000 (15:21 -0500)] 
Clean Up Debugging Statements

3 years agoRestrict `GNU-stack` Note to GNU Assemblers
W. Felix Handte [Wed, 5 Jan 2022 21:03:32 +0000 (16:03 -0500)] 
Restrict `GNU-stack` Note to GNU Assemblers

3 years agoWrite `GNU-stack` Section on All ELF Architectures
W. Felix Handte [Wed, 5 Jan 2022 20:42:58 +0000 (15:42 -0500)] 
Write `GNU-stack` Section on All ELF Architectures

Previously we did this only on Linux, which missed other Unices.

3 years agoMakefiles: Add `noexecstack` Options to Compilation and Linking
W. Felix Handte [Wed, 5 Jan 2022 19:53:22 +0000 (14:53 -0500)] 
Makefiles: Add `noexecstack` Options to Compilation and Linking

Hopefully this marks the binary artifacts `noexecstack` even on platforms
where binaries default to true.

3 years agoMerge pull request #2972 from terrelln/meson-fix
Nick Terrell [Wed, 5 Jan 2022 17:27:33 +0000 (09:27 -0800)] 
Merge pull request #2972 from terrelln/meson-fix

[meson] Explicitly disable assembly for non clang/gcc copmilers

3 years agoMerge pull request #2969 from facebook/fix2966_part1
Yann Collet [Wed, 5 Jan 2022 01:03:10 +0000 (17:03 -0800)] 
Merge pull request #2969 from facebook/fix2966_part1

fix performance issue in scenario #2966 (part 1)

3 years ago[meson] Explicitly disable assembly for non clang/gcc copmilers 2972/head
Nick Terrell [Wed, 5 Jan 2022 00:05:59 +0000 (16:05 -0800)] 
[meson] Explicitly disable assembly for non clang/gcc copmilers

After merging #2951 I realized that we will want to explicitly disable
assembly when we aren't including the assembly source file. Otherwise,
if some non clang/gcc compiler does support assembly, it would fail to
build.

3 years agoMerge pull request #2951 from eli-schwartz/msvc-no-asm
Nick Terrell [Tue, 4 Jan 2022 23:56:35 +0000 (15:56 -0800)] 
Merge pull request #2951 from eli-schwartz/msvc-no-asm

meson: fix MSVC support

3 years agoAdd Test Validating Stack is not Executable in playTests.sh
W. Felix Handte [Thu, 30 Dec 2021 02:42:32 +0000 (18:42 -0800)] 
Add Test Validating Stack is not Executable in playTests.sh

3 years agoUpdated expression for better readability 2969/head
Yann Collet [Tue, 4 Jan 2022 17:07:11 +0000 (09:07 -0800)] 
Updated expression for better readability

3 years agofullbench: added compress_freshCCtx scenario
Yann Collet [Sun, 2 Jan 2022 16:52:33 +0000 (08:52 -0800)] 
fullbench: added compress_freshCCtx scenario

3 years agofixed fullbench freshCCtx scenario
Yann Collet [Sun, 2 Jan 2022 07:46:49 +0000 (23:46 -0800)] 
fixed fullbench freshCCtx scenario

3 years agofix performance issue in scenario #2966 (part 1)
Yann Collet [Fri, 31 Dec 2021 21:03:12 +0000 (13:03 -0800)] 
fix performance issue in scenario #2966 (part 1)

When re-using a compression state, across multiple successive compressions,
the state should minimize the amount of allocation and initialization required.

This mostly matters in situations where initialization is an overwhelming task
compared to compression itself.
This can happen when the amount to compress is small,
while the compression state was given the impression that it would be much larger,
aka, streaming mode without providing a srcSize hint.

This lean-initialization optimization was broken in 980f3bbf8354edec0ad32b4430800f330185de6a .

This commit fixes it, making this scenario once again on par with v1.4.9.

Note that this does not completely fix #2966,
since another heavy initialization, specific to row mode,
is also happening (and was not present in v1.4.9).
This will be fixed in a separate commit.

3 years agofixed backup prototype for POOL_sizeof()
Yann Collet [Thu, 30 Dec 2021 22:33:21 +0000 (14:33 -0800)] 
fixed backup prototype for POOL_sizeof()

3 years agoPOOL_sizeof() only needs a const read-only reference
Yann Collet [Thu, 30 Dec 2021 22:08:51 +0000 (14:08 -0800)] 
POOL_sizeof() only needs a const read-only reference

3 years agofixed minor compression difference in btlazy2 2965/head
Yann Collet [Thu, 30 Dec 2021 02:51:03 +0000 (18:51 -0800)] 
fixed minor compression difference in btlazy2

subtle dependency on sumtype numeric representation

3 years agoMark Huffman Decoder Assembly `noexecstack` on All Architectures
W. Felix Handte [Thu, 30 Dec 2021 01:47:12 +0000 (17:47 -0800)] 
Mark Huffman Decoder Assembly `noexecstack` on All Architectures

Apparently, even when the assembly file is empty (because
`ZSTD_ENABLE_ASM_X86_64_BMI2` is false), it still is marked as possibly
needing an executable stack and so the whole library is marked as such. This
commit applies a simple patch for this problem by moving the noexecstack
indication outside the macro guard.

This commit builds on #2857.

This commit addresses #2963.

3 years agoupdated all names to offBase convention
Yann Collet [Thu, 30 Dec 2021 01:30:43 +0000 (17:30 -0800)] 
updated all names to offBase convention

3 years agoMerge pull request #2962 from facebook/seqStore_off
Yann Collet [Thu, 30 Dec 2021 00:07:36 +0000 (16:07 -0800)] 
Merge pull request #2962 from facebook/seqStore_off

Refactor offset+repcode sumtype