Yann Collet
1519312d24
Merge pull request #995 from t-mat/travis-remove-qemu
...
Remove QEMU test from .travis.yml
2021-05-30 10:24:52 -07:00
Yann Collet
31fb0bb4b8
Merge pull request #994 from t-mat/makefile-split-cstds
...
Split c_standards into multiple Makefile targets
2021-05-30 10:24:14 -07:00
Takayuki Matsuoka
bf140842d9
Remove QEMU test from .travis.yml
...
We have same test in GitHub Actions.
2021-05-30 18:39:33 +09:00
Yann Collet
e8a8fd6f0b
Merge pull request #992 from t-mat/fix-clang-warning-1
...
Fix -Wshorten-64-to-32 warning
2021-05-30 01:28:36 -07:00
Takayuki Matsuoka
6443b85af4
Split c_standards into multiple Makefile targets
...
To support older compiler which doesn't have explicit dialect option
for C90 (gcc-4.4), this change set split "c_standards" into multiple
part.
Original "make c_standards" still works as intended. But this change
gives extra freedom of choice for external program For example, CI
can choose test for standards which is supported by specimen compiler.
With this separation, we can also introduce C17 smoothly.
2021-05-30 17:10:19 +09:00
Takayuki Matsuoka
28cb94f53a
Fix -Wshorten-64-to-32 warning
...
Fix -Wshorten-64-to-32 warning
The following CI test (macOS) reports "-Wshorten-64-to-32" warning
make V=1 clean test MOREFLAGS='-Werror -Wconversion -Wno-sign-conversion'
```
blockStreaming_lineByLine.c:68:54: error: implicit conversion loses integer precision: 'const size_t' (aka 'const unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
lz4Stream, inpPtr, cmpBuf, inpBytes, cmpBufBytes, 1);
^~~~~~~~~~~
```
2021-05-30 16:49:24 +09:00
Yann Collet
634fa2047d
Merge pull request #989 from lz4/fix_nullub_lz4
...
Fix NULL ptr arithmetic in lz4.c
2021-05-28 09:42:01 -07:00
Yann Collet
dfc431fb3d
fix NULL ptr arithmetic at lz4:2299
2021-05-28 01:10:41 -07:00
Yann Collet
539c783c98
fix NULL ptr arithmetic in lz4:1680
...
only do arithmetic if offset > 0
2021-05-28 01:08:18 -07:00
Yann Collet
e73c318a79
Merge branch 'dev' into fix_nullub_lz4
2021-05-28 00:56:46 -07:00
Yann Collet
59273b7127
fix UB lz4:988 and lz4:1178
...
ensure `dictBase` is only used
when there is an actual dictionary content.
2021-05-28 00:56:26 -07:00
Yann Collet
cacdcf1f51
Merge pull request #987 from t-mat/tmp-disable-meson
...
Disable Meson + clang build at travis-ci
2021-05-28 00:12:59 -07:00
Takayuki Matsuoka
1f6d2efda1
Disable Meson + clang build at travis-ci
2021-05-28 16:02:07 +09:00
Yann Collet
6ac3b7ba94
Merge pull request #985 from t-mat/add-github-actions
...
Add GitHub Actions script ci.yml
2021-05-27 23:57:55 -07:00
Yann Collet
dd7a6fbdc4
Merge pull request #986 from lz4/fixub907
...
fix UB of lz4frame:907
2021-05-27 23:57:19 -07:00
Takayuki Matsuoka
54b695800d
Temporary ignore make usan
...
We must enable this test when all make usan errors will be resolved properly.
2021-05-28 15:28:59 +09:00
Yann Collet
c2c0c47d5f
fix NULL ptr arithmetic of lz4:1572
...
was blindly adding an offset (0) to `dictionary` which could be `NULL`.
2021-05-27 23:20:28 -07:00
Yann Collet
8e46846287
fix UB of lz4frame:907
...
now line 912
by ensuring pointer arithmetic is only performed
if there is a reason for an internal buffer to be used.
2021-05-27 22:59:22 -07:00
Yann Collet
5b86e4e5ed
Merge pull request #982 from t-mat/fix-make-usan
...
Fix 'make usan'
2021-05-27 10:24:41 -07:00
Yann Collet
d00319baab
Merge pull request #984 from t-mat/fix-wconversion-warning
...
Fix -Wshorten-64-to-32 warning
2021-05-27 10:13:24 -07:00
Takayuki Matsuoka
0276f0b120
Add GitHub Actions script ci.yml
2021-05-27 21:18:58 +09:00
Takayuki Matsuoka
4a9bbc2480
Fix -Wshorten-64-to-32 warning
2021-05-27 21:12:39 +09:00
Takayuki Matsuoka
0d2570b7c5
Add CC propagation to 'make usan'
...
The following command doesn't work as intended
```
cd
git clone https://github.com/lz4/lz4.git
cd lz4
make usan MOREFLAGS='-Wcomma -Werror'
```
```
Cleaning completed
cc: error: unrecognized command line option ‘-Wcomma’; did you mean ‘-Wcomment’?
make[3]: *** [<builtin>: ../lib/lz4.o] Error 1
make[2]: *** [Makefile:65: lz4] Error 2
make[1]: *** [Makefile:133: test] Error 2
make: *** [Makefile:158: usan] Error 2
```
Because the following part of the `Makefile` doesn't propagate `CC`, `CFLAGS` and `LDFLAGS` to child `$(MAKE)` properly.
```
.PHONY: usan
usan: CC = clang
usan: CFLAGS = -O3 -g -fsanitize=undefined -fno-sanitize-recover=undefined -fsanitize-recover=pointer-overflow
usan: LDFLAGS = $(CFLAGS)
usan: clean
$(MAKE) test FUZZER_TIME="-T30s" NB_LOOPS=-i1
```
We need explicit propagation for child process
```
- $(MAKE) test FUZZER_TIME="-T30s" NB_LOOPS=-i1
+ CC=$(CC) CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) $(MAKE) test FUZZER_TIME="-T30s" NB_LOOPS=-i1
```
After that, `make usan` works and it shows expected runtime error.
```
$ make usan MOREFLAGS='-Wcomma -Werror'
Cleaning completed
../lib/lz4frame.c:907:25: runtime error: applying non-zero offset 65536 to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../lib/lz4frame.c:907:25 in
../lib/lz4frame.c:907:58: runtime error: applying zero offset to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../lib/lz4frame.c:907:58 in
...
```
Please note that `make usan` is working at travis-ci. Because `.travis.yml` has the following [explicit `compiler:` setting](7a966c1511/.travis.yml (L66)
).
```
- name: (Trusty) USan test
dist: trusty
compiler: clang
script:
- make usan MOREFLAGS=-Wcomma -Werror
```
2021-05-27 21:02:34 +09:00
Yann Collet
7a966c1511
Merge pull request #972 from jasperla/memmove_crash
...
Fix potential memory corruption with negative memmove() size
2021-04-30 08:56:25 -07:00
Yann Collet
7d8d1075e6
fixed incorrect propagation of default CFLAGS
2021-04-26 22:40:40 -07:00
Yann Collet
bdc9d3b0c1
Merge pull request #973 from klebertarcisio/patch_fix
...
Avoiding null pointer dereference
2021-03-10 09:56:06 -08:00
klebertosantos
29a6a1f494
fix null pointer dereference
2021-03-10 09:37:57 -03:00
Jasper Lievisse Adriaanse
8301a21773
Fix potential memory corruption with negative memmove() size
2021-02-26 15:21:20 +01:00
Yann Collet
1d58f77818
Merge pull request #970 from Nimloth/patch-1
...
Update .cirrus.yml
2021-02-19 07:29:07 -08:00
Nimloth
5e433066f8
Update .cirrus.yml
...
current up-to-date stable branch is 12.2
2021-02-19 08:29:56 +01:00
Yann Collet
a8e888774a
Merge pull request #964 from sigiesec/fix-ubsan-resetStreamHC_fast
...
Don't trigger UBSan warning in LZ4_resetStreamHC_fast if LZ4_streamHC…
2021-01-19 02:54:18 -08:00
Yann Collet
cbd186eace
Merge pull request #966 from dosaboy/snap-build-1.9.3
...
Update snapcraft.yaml to reflect latest build
2021-01-07 14:32:38 -08:00
Edward Hope-Morley
c667bbcaf9
Update snapcraft.yaml to reflect latest build
2021-01-07 21:39:00 +00:00
Yann Collet
1930488135
Merge pull request #965 from ThomasWaldmann/fix-typos
...
fix some typos (work by Andrea Gelmini)
2021-01-07 09:43:11 -08:00
Thomas Waldmann
909aae8260
fix some typos (work by Andrea Gelmini)
2021-01-07 18:39:57 +01:00
Simon Giesecke
06b07e175e
Don't trigger UBSan warning in LZ4_resetStreamHC_fast if LZ4_streamHCPtr->internal_donotuse.end is NULL.
2021-01-07 10:21:48 +01:00
Yann Collet
023bb62c8d
Merge pull request #962 from hmaarrfk/patch-1
...
Add include locations for x64 builds as well
2021-01-05 10:08:39 -08:00
Mark Harfouche
d0b7d802d7
Add include locations for x64 builds as well
2020-12-28 09:06:40 -05:00
Yann Collet
384eb15835
Merge pull request #960 from lz4/Makefile_export
...
Makefile correctly export CFLAGS
2020-12-17 10:17:47 -08:00
Yann Collet
28ff53b868
fix minor pedantic warnings
...
initialization and conversion
2020-12-01 08:11:35 -08:00
Yann Collet
4b7a327068
fix strange printf formatting warning
...
so now, `%p` _requires_ a `void*` pointer ?
2020-12-01 08:05:19 -08:00
Yann Collet
50ff8b3ae8
fix minor header date
2020-11-30 18:16:00 -08:00
Yann Collet
16bad2caaf
fix scanbuild test
...
seems to require explicit environment variables
2020-11-30 18:13:05 -08:00
Yann Collet
19564bce78
fix CFLAGS unexport issue
2020-11-30 17:42:36 -08:00
Yann Collet
5a551754cf
Merge branch 'dev' into Makefile
...
remove `LN_S`
2020-11-30 16:09:22 -08:00
Yann Collet
07a2476fe6
Merge pull request #959 from lz4/install_ln
...
install links over existing install
2020-11-30 16:07:44 -08:00
Yann Collet
e585a438c7
refactor Makefile
...
remove usage of include Makefile.inc in too Makefile
as it seems to somehow unexport CFLAGS ...
2020-11-30 16:06:50 -08:00
Yann Collet
165fdddc28
install links over existing install
...
ensures links are created
2020-11-30 05:13:38 -08:00
Yann Collet
87a80acbe7
updated license & header dates
2020-11-25 14:45:14 -08:00
Yann Collet
51976dcb24
ignore test artifacts starting with tmp*
2020-11-25 12:09:06 -08:00