Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stage v1.9.4 #1138

Merged
merged 346 commits into from
Aug 15, 2022
Merged

stage v1.9.4 #1138

merged 346 commits into from
Aug 15, 2022

Conversation

Cyan4973
Copy link
Member

No description provided.

eloj and others added 30 commits July 31, 2021 18:59
This is required to correctly size a static member
to hold the hash table, whose size is derived from
LZ4_MEMORY_USAGE.
Ensure that the memory block we're trying
to reuse is large enough for the new state.

Fixes #974
The Ubuntu 16.04 environment is being removed by github
on September 20, 2021. They will induce 'brownouts'
starting from September 6 to get clients to move on.

This change removes testing of GCC versions prior to 4.8,
and clang versions prior to 3.9

Ref: actions/runner-images#3287
With the removal of Ubuntu 16.04, all compilers in
in the matrix supports c90, so remove this column
from the matrix, and unconditionally test this.
With the removal of Ubuntu 16.04, all compilers in
in the matrix supports c11, so remove this column
from the matrix, and unconditionally test this.
Define LZ4_STREAMSIZE in terms of LZ4_MEMORY_USAGE.
add -lrt on Solaris 10, required for nanosleep
On line 83, U+2013 was replaced with U+002D in order to improve compatibility with MSVC 2019 and older compilers.
nit(programs/platform.h): replace Unicode character #1018
ci: merge unicode lint to github actions and expand test coverage to ./tests/ directory
fix clang-cl _tzcnt_u64 not defined issue
on top of providing a central definition place, which eases maintenance,
it might also help for #1021.

Also : updated doc
t-mat and others added 29 commits August 8, 2022 18:04
The 'freestanding' flag indicates a capability of compiling and executing freestanding code.
Currently it requires Linux, x86_64 and (relatively newer) gcc/g++.
Add document for LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION
cmake_minimum_required() must always be the first instruction of a CMakeLists.
project() should come after cmake_minimum_required() as soon as possible. Therefore option() are moved after project().
Update documentation in preparation for release v1.9.4
…tion

cmake: move `cmake_minimum_required()` before `project()`
lz4frame favors the faster prefix mode
when decompressing a frame with linked blocks.

This significantly improved CLI decompression on files compressed with -BD4 setting.
On my laptop, decompressing `enwik9` went from 0.89s to 0.52s.

This improvement is only for linked blocks.
It's more visible for small block sizes.
faster CLI decompression speed for frames compressed with -BD4 setting
MSVC (17.3 or earlier) reports the following warning

lz4\lib\lz4.c(527): warning C6385: Reading invalid data from 'v'.
Line 527 is : LZ4_memcpy(&v[4], v, 4);

But, obviously v[0..3] is always filled with meaningful value.
Therefore, this warning report is wrong.

We must revisit this issue with future version of MSVC.
Since rc.exe (the resource compiler) is legacy compiler,  it truncates preprocessor symbol name length to 32 chars.
And it reports the following warning

lz4\build\VS2022\..\..\lib\lz4.h(314): warning RC4011: identifier truncated to 'LZ4_STATIC_LINKING_ONLY_DISABLE'
lz4\build\VS2022\..\..\lib\lz4.h(401): warning RC4011: identifier truncated to 'LZ4_STATIC_LINKING_ONLY_DISABLE'

This patch detects rc.exe and just skips long symbol.
MSVC 2022 reports the follwing false positve warnings:

lz4\tests\datagencli.c(110): warning C26451: Arithmetic overflow: Using operator '-' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '-' to avoid overflow (io.2).
lz4\tests\datagencli.c(134): warning C26451: Arithmetic overflow: Using operator '-' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '-' to avoid overflow (io.2).
lz4\tests\datagencli.c(146): warning C26451: Arithmetic overflow: Using operator '-' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '-' to avoid overflow (io.2).

Although they're absolutely compiler's and static analyzer's bug,
it'd always be nice to use the standard library.
GH-Actions: Add ubuntu-22.04 and the latest C/C++ compilers for Linux
Suppress the following false positive warnings from MSVC:
- Disable all arithmetic overflow (C26451)
- Suppress C6385: Reading invalid data from 'compressedBuffer'.
- Add ULL suffix to unsigned 64-bits constants.
This patch fixes the following error from "make staticAnalyze"

datagencli.c:106:21: warning: Value stored to 'size' is never read
                    size=0;
                    ^    ~
Support MSVC 2022 (version 17.3)
@Cyan4973 Cyan4973 merged commit 5ff8396 into release Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet