Skip to content

Commit 11b8a1e

Browse files
authored
Merge pull request #2 from parthitce/dev/v1.10.0
Upgrade to release version v1.10.0
2 parents 8e303c2 + 65534ad commit 11b8a1e

File tree

181 files changed

+13589
-7228
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+13589
-7228
lines changed

.circleci/config.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,26 +43,26 @@ jobs:
4343
# Test
4444
# This would typically be a build job when using workflows, possibly combined with build
4545
# This is based on your 1.0 configuration file or project settings
46-
- run: CFLAGS= make clangtest && make clean
47-
- run: g++ -v; make cxxtest && make clean
48-
- run: gcc -v; g++ -v; make ctocpptest && make clean
46+
- run: CC=clang CFLAGS="-Werror -O0" make all && make clean
47+
- run: c++ -v; make cxxtest && make clean
48+
- run: cc -v; c++ -v; make ctocxxtest && make clean
4949
- run: gcc-5 -v; CC=gcc-5 CFLAGS="-O2 -Werror" make check && make clean
5050
- run: gcc-5 -v; CC=gcc-5 CFLAGS="-O2 -m32 -Werror" CPPFLAGS=-I/usr/include/x86_64-linux-gnu make check && make clean
51-
- run: gcc-6 -v; CC=gcc-6 MOREFLAGS="-O2 -Werror" make check && make clean
52-
- run: make cmake && make clean
51+
- run: gcc-6 -v; CC=gcc-6 CFLAGS="-O2 -Werror" make check && make clean
52+
- run: make cmakebuild && make clean
5353
- run: make -C tests test-lz4
5454
- run: make -C tests test-lz4c
5555
- run: make -C tests test-frametest
5656
- run: make -C tests test-fuzzer && make clean
57-
- run: make -C lib all && make clean
58-
- run: pyenv global 3.4.4; make versionsTest MOREFLAGS=-I/usr/include/x86_64-linux-gnu && make clean
59-
- run: make travis-install && make clean
57+
- run: make -C lib all && make clean
58+
- run: pyenv global 3.4.4; CPPFLAGS=-I/usr/include/x86_64-linux-gnu make versionsTest && make clean
59+
- run: make test-install && make clean
6060
- run: gcc -v; CFLAGS="-O2 -m32 -Werror" CPPFLAGS=-I/usr/include/x86_64-linux-gnu make check && make clean
6161
- run: clang -v; make staticAnalyze && make clean
62-
- run: make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static && make clean
63-
- run: make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static MOREFLAGS=-m64 && make clean
64-
- run: make platformTest CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static && make clean
65-
- run: make platformTest CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static && make clean
62+
- run: make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static V=1 && make clean
63+
- run: CFLAGS=-m64 LDFLAGS=-m64 make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static V=1 && make clean
64+
- run: make platformTest CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static V=1 && make clean
65+
- run: make platformTest CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static V=1 && make clean
6666
# Teardown
6767
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
6868
# Save test results

.cirrus.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
freebsd_instance:
2-
image_family: freebsd-12-1
3-
41
task:
5-
script: pkg install -y gmake && gmake test
2+
name: FreeBSD
3+
freebsd_instance:
4+
matrix:
5+
image_family: freebsd-14-0
6+
install_script: pkg install -y gmake
7+
script: |
8+
cc -v
9+
gmake test

.clang-format

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# This is the configuration file for clang-format, an automatic code formatter.
2+
# Introduction: https://clang.llvm.org/docs/ClangFormat.html
3+
# Supported options: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
4+
5+
Language: Cpp
6+
Standard: Latest
7+
8+
ColumnLimit: 110
9+
10+
UseTab: Never
11+
IndentWidth: 4
12+
PPIndentWidth: 2
13+
ContinuationIndentWidth: 4
14+
15+
LineEnding: LF
16+
InsertNewlineAtEOF: true
17+
KeepEmptyLinesAtTheStartOfBlocks: false
18+
MaxEmptyLinesToKeep: 1
19+
20+
IndentCaseBlocks: false
21+
IndentCaseLabels: false
22+
IndentGotoLabels: false
23+
IndentPPDirectives: AfterHash
24+
IndentWrappedFunctionNames: false
25+
26+
AlignAfterOpenBracket: Align
27+
AlignArrayOfStructures: Right
28+
AlignEscapedNewlines: Left
29+
AlignOperands: Align
30+
AlignConsecutiveAssignments:
31+
Enabled: true
32+
AcrossEmptyLines: false
33+
AcrossComments: false
34+
AlignCompound: false
35+
PadOperators: false
36+
AlignConsecutiveBitFields:
37+
Enabled: true
38+
AcrossEmptyLines: false
39+
AcrossComments: false
40+
AlignConsecutiveDeclarations:
41+
Enabled: true
42+
AcrossEmptyLines: false
43+
AcrossComments: false
44+
AlignConsecutiveMacros:
45+
Enabled: true
46+
AcrossEmptyLines: false
47+
AcrossComments: false
48+
AlignTrailingComments:
49+
Kind: Leave
50+
OverEmptyLines: 0
51+
52+
BinPackArguments: true
53+
BinPackParameters: false
54+
AllowAllArgumentsOnNextLine: true
55+
AllowAllParametersOfDeclarationOnNextLine: false
56+
57+
AllowShortBlocksOnASingleLine: Never
58+
AllowShortCaseLabelsOnASingleLine: false
59+
AllowShortEnumsOnASingleLine: true
60+
AllowShortFunctionsOnASingleLine: None
61+
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
62+
AllowShortLoopsOnASingleLine: false
63+
64+
AlwaysBreakAfterReturnType: None
65+
AlwaysBreakBeforeMultilineStrings: false
66+
BraceWrapping:
67+
AfterCaseLabel: false
68+
AfterControlStatement: Never
69+
AfterEnum: false
70+
AfterExternBlock: false
71+
AfterFunction: true
72+
AfterStruct: false
73+
AfterUnion: false
74+
BeforeElse: false
75+
BeforeWhile: false
76+
IndentBraces: false
77+
SplitEmptyFunction: false
78+
SplitEmptyRecord: false
79+
BreakAfterAttributes: Never
80+
BreakBeforeBinaryOperators: None
81+
BreakBeforeBraces: Custom
82+
BreakBeforeInlineASMColon: OnlyMultiline
83+
BreakBeforeTernaryOperators: true
84+
85+
DerivePointerAlignment: false
86+
PointerAlignment: Left
87+
88+
QualifierAlignment: Custom
89+
QualifierOrder: ["inline", "static", "volatile", "restrict", "const", "type"]
90+
91+
ReflowComments: false
92+
BreakStringLiterals: false
93+
RemoveSemicolon: true
94+
RemoveParentheses: ReturnStatement
95+
InsertBraces: false
96+
SeparateDefinitionBlocks: Always
97+
98+
SpaceAfterCStyleCast: false
99+
SpaceAfterLogicalNot: false
100+
SpaceAroundPointerQualifiers: Default
101+
SpaceBeforeAssignmentOperators: true
102+
SpaceBeforeCaseColon: false
103+
SpaceBeforeParens: ControlStatements
104+
BitFieldColonSpacing: Both
105+
SpaceBeforeSquareBrackets: false
106+
SpaceInEmptyBlock: false
107+
SpacesBeforeTrailingComments: 1
108+
SpacesInSquareBrackets: false
109+
SpacesInLineCommentPrefix:
110+
Minimum: 1
111+
Maximum: -1
112+
113+
SortIncludes: Never
114+
IncludeBlocks: Preserve
115+
IncludeIsMainRegex: ""
116+
IncludeCategories:
117+
- {Regex: "<.*>", Priority: -2, CaseSensitive: true}
118+
- {Regex: "\".*\"", Priority: -1, CaseSensitive: true}
119+
120+
AttributeMacros: ["__capability"]
121+
StatementAttributeLikeMacros: []
122+
StatementMacros: []
123+
124+
PenaltyBreakAssignment: 200
125+
PenaltyBreakBeforeFirstCallParameter: 19
126+
PenaltyBreakComment: 300
127+
PenaltyBreakFirstLessLess: 120
128+
PenaltyBreakOpenParenthesis: 0
129+
PenaltyBreakString: 1000
130+
PenaltyExcessCharacter: 10
131+
PenaltyIndentedWhitespace: 0
132+
PenaltyReturnTypeOnItsOwnLine: 60

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ If applicable, add screenshots to help explain your problem.
2626
- Version [e.g. 22]
2727
- Compiler [e.g. gcc]
2828
- Build System [e.g. Makefile]
29-
- Other hardware specs [e.g Core 2 duo...]
29+
- Other hardware specs [e.g. Core 2 duo...]
3030

3131
**Additional context**
3232
Add any other context about the problem here.

.github/dependabot.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: github-actions
5+
directory: /
6+
schedule:
7+
interval: weekly

.github/workflows/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
This directory contains [GitHub Actions](https://github.com/features/actions) workflow files.
2+
3+
# Known issues
4+
5+
## USAN, ASAN (`lz4-ubsan-x64`, `lz4-ubsan-x86`, `lz4-asan-x64`)
6+
7+
For now, `lz4-ubsan-*` uses the `-fsanitize-recover=pointer-overflow` flag:
8+
there are known cases of pointer overflow arithmetic within `lz4.c` fast compression.
9+
These cases are not dangerous with known architecture,
10+
but they are not guaranteed to work by the C standard,
11+
which means that, in some future, some new architecture or some new compiler
12+
may decide to do something funny that could break this behavior.
13+
Hence, in anticipation, it's better to remove them.
14+
This has been already achieved in `lz4hc.c`.
15+
However, the same attempt in `lz4.c` resulted in massive speed losses,
16+
which is not an acceptable cost for preemptively solving a "potential future" problem
17+
not active anywhere today.
18+
Therefore, a more acceptable work-around will have to be found first.
19+
20+
21+
22+
## cppcheck (`lz4-cppcheck`)
23+
24+
This test script ignores the exit code of `make cppcheck`.
25+
Because this project doesn't 100% follow their recommendation.
26+
Also sometimes it reports false positives.
27+
28+
29+
30+
# Notes
31+
32+
- You can investigate various information at the right pane of GitHub
33+
Actions report page.
34+
35+
| Item | Section in the right pane |
36+
| ------------------------- | ------------------------------------- |
37+
| OS, VM | Set up job |
38+
| git repo, commit hash | Run actions/checkout@v2 |
39+
| Version of tools | Environment info |
40+
41+
42+
43+
# Difference with `.travis.yml`
44+
45+
The following tests are not be included due to limitation of GH-Actions.
46+
47+
- name: aarch64 real-hw tests
48+
- name: PPC64LE real-hw tests
49+
- name: IBM s390x real-hw tests

0 commit comments

Comments
 (0)