extlz4 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +9 -4
- data/bin/extlz4 +1 -1
- data/contrib/lz4/NEWS +36 -0
- data/contrib/lz4/README.md +11 -12
- data/contrib/lz4/build/README.md +55 -0
- data/contrib/lz4/build/VS2010/datagen/datagen.vcxproj +169 -0
- data/contrib/lz4/build/VS2010/frametest/frametest.vcxproj +176 -0
- data/contrib/lz4/build/VS2010/fullbench-dll/fullbench-dll.vcxproj +180 -0
- data/contrib/lz4/build/VS2010/fullbench/fullbench.vcxproj +176 -0
- data/contrib/lz4/build/VS2010/fuzzer/fuzzer.vcxproj +173 -0
- data/contrib/lz4/build/VS2010/liblz4-dll/liblz4-dll.rc +51 -0
- data/contrib/lz4/build/VS2010/liblz4-dll/liblz4-dll.vcxproj +179 -0
- data/contrib/lz4/build/VS2010/liblz4/liblz4.vcxproj +175 -0
- data/contrib/lz4/build/VS2010/lz4.sln +98 -0
- data/contrib/lz4/build/VS2010/lz4/lz4.rc +51 -0
- data/contrib/lz4/build/VS2010/lz4/lz4.vcxproj +189 -0
- data/contrib/lz4/build/VS2017/datagen/datagen.vcxproj +173 -0
- data/contrib/lz4/build/VS2017/frametest/frametest.vcxproj +180 -0
- data/contrib/lz4/build/VS2017/fullbench-dll/fullbench-dll.vcxproj +184 -0
- data/contrib/lz4/build/VS2017/fullbench/fullbench.vcxproj +180 -0
- data/contrib/lz4/build/VS2017/fuzzer/fuzzer.vcxproj +177 -0
- data/contrib/lz4/build/VS2017/liblz4-dll/liblz4-dll.rc +51 -0
- data/contrib/lz4/build/VS2017/liblz4-dll/liblz4-dll.vcxproj +183 -0
- data/contrib/lz4/build/VS2017/liblz4/liblz4.vcxproj +179 -0
- data/contrib/lz4/build/VS2017/lz4.sln +103 -0
- data/contrib/lz4/build/VS2017/lz4/lz4.rc +51 -0
- data/contrib/lz4/build/VS2017/lz4/lz4.vcxproj +164 -0
- data/contrib/lz4/build/cmake/CMakeLists.txt +235 -0
- data/contrib/lz4/lib/README.md +27 -10
- data/contrib/lz4/lib/lz4.c +327 -230
- data/contrib/lz4/lib/lz4.h +80 -70
- data/contrib/lz4/lib/lz4frame.c +93 -54
- data/contrib/lz4/lib/lz4frame.h +22 -14
- data/contrib/lz4/lib/lz4hc.c +192 -115
- data/contrib/lz4/lib/lz4hc.h +15 -40
- data/contrib/lz4/ossfuzz/Makefile +12 -8
- data/contrib/lz4/ossfuzz/compress_frame_fuzzer.c +11 -5
- data/contrib/lz4/ossfuzz/compress_fuzzer.c +9 -2
- data/contrib/lz4/ossfuzz/compress_hc_fuzzer.c +10 -3
- data/contrib/lz4/ossfuzz/decompress_frame_fuzzer.c +11 -3
- data/contrib/lz4/ossfuzz/decompress_fuzzer.c +6 -2
- data/contrib/lz4/ossfuzz/fuzz_data_producer.c +77 -0
- data/contrib/lz4/ossfuzz/fuzz_data_producer.h +36 -0
- data/contrib/lz4/ossfuzz/round_trip_frame_fuzzer.c +8 -4
- data/contrib/lz4/ossfuzz/round_trip_fuzzer.c +9 -2
- data/contrib/lz4/ossfuzz/round_trip_hc_fuzzer.c +7 -2
- data/contrib/lz4/ossfuzz/travisoss.sh +6 -1
- data/contrib/lz4/tmp +0 -0
- data/contrib/lz4/tmpsparse +0 -0
- data/ext/extlz4.c +2 -0
- data/ext/extlz4.h +5 -0
- data/ext/hashargs.c +1 -1
- data/ext/hashargs.h +1 -1
- data/gemstub.rb +3 -14
- data/lib/extlz4.rb +0 -2
- data/lib/extlz4/oldstream.rb +1 -1
- metadata +40 -25
- data/lib/extlz4/version.rb +0 -3
@@ -9,16 +9,20 @@
|
|
9
9
|
#include <string.h>
|
10
10
|
|
11
11
|
#include "fuzz_helpers.h"
|
12
|
+
#include "fuzz_data_producer.h"
|
12
13
|
#include "lz4.h"
|
13
14
|
#include "lz4hc.h"
|
14
15
|
|
15
16
|
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
16
17
|
{
|
17
|
-
|
18
|
+
FUZZ_dataProducer_t *producer = FUZZ_dataProducer_create(data, size);
|
19
|
+
int const level = FUZZ_dataProducer_range32(producer,
|
20
|
+
LZ4HC_CLEVEL_MIN, LZ4HC_CLEVEL_MAX);
|
21
|
+
size = FUZZ_dataProducer_remainingBytes(producer);
|
22
|
+
|
18
23
|
size_t const dstCapacity = LZ4_compressBound(size);
|
19
24
|
char* const dst = (char*)malloc(dstCapacity);
|
20
25
|
char* const rt = (char*)malloc(size);
|
21
|
-
int const level = FUZZ_rand32(&seed, LZ4HC_CLEVEL_MIN, LZ4HC_CLEVEL_MAX);
|
22
26
|
|
23
27
|
FUZZ_ASSERT(dst);
|
24
28
|
FUZZ_ASSERT(rt);
|
@@ -34,6 +38,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
|
34
38
|
|
35
39
|
free(dst);
|
36
40
|
free(rt);
|
41
|
+
FUZZ_dataProducer_free(producer);
|
37
42
|
|
38
43
|
return 0;
|
39
44
|
}
|
@@ -12,7 +12,12 @@ then
|
|
12
12
|
fi
|
13
13
|
|
14
14
|
# Modify the oss-fuzz Dockerfile so that we're checking out the current branch on travis.
|
15
|
-
|
15
|
+
if [ "x${TRAVIS_PULL_REQUEST}" = "xfalse" ]
|
16
|
+
then
|
17
|
+
sed -i "s@https://github.com/lz4/lz4.git@-b ${TRAVIS_BRANCH} https://github.com/lz4/lz4.git@" /tmp/ossfuzz/projects/lz4/Dockerfile
|
18
|
+
else
|
19
|
+
sed -i "s@https://github.com/lz4/lz4.git@-b ${TRAVIS_PULL_REQUEST_BRANCH} https://github.com/${TRAVIS_PULL_REQUEST_SLUG}.git@" /tmp/ossfuzz/projects/lz4/Dockerfile
|
20
|
+
fi
|
16
21
|
|
17
22
|
# Try and build the fuzzers
|
18
23
|
pushd /tmp/ossfuzz
|
data/contrib/lz4/tmp
ADDED
Binary file
|
Binary file
|
data/ext/extlz4.c
CHANGED
data/ext/extlz4.h
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
#include <stdarg.h>
|
7
7
|
#include <stdlib.h>
|
8
8
|
#include <errno.h>
|
9
|
+
#include <stdbool.h>
|
9
10
|
|
10
11
|
#ifndef RB_OBJ_FROZEN
|
11
12
|
# define RB_OBJ_FROZEN OBJ_FROZEN
|
@@ -17,6 +18,10 @@ extern VALUE extlz4_eError; /* class LZ4::Error < ::RuntimeError */
|
|
17
18
|
extern void extlz4_init_blockapi(void);
|
18
19
|
extern void extlz4_init_frameapi(void);
|
19
20
|
|
21
|
+
#ifndef RB_EXT_RACTOR_SAFE
|
22
|
+
# define RB_EXT_RACTOR_SAFE(FEATURE) ((void)(FEATURE))
|
23
|
+
#endif
|
24
|
+
|
20
25
|
#define AUX_FUNCALL(RECV, METHOD, ...) \
|
21
26
|
({ \
|
22
27
|
VALUE args__[] = { __VA_ARGS__ }; \
|
data/ext/hashargs.c
CHANGED
data/ext/hashargs.h
CHANGED
data/gemstub.rb
CHANGED
@@ -2,17 +2,6 @@ unless ver = File.read("README.md").scan(/^\s*[\*\-]\s*version:{1,2}\s*(.+)/i).f
|
|
2
2
|
raise "バージョン情報が README.md に見つかりません"
|
3
3
|
end
|
4
4
|
|
5
|
-
verfile = "lib/extlz4/version.rb"
|
6
|
-
LIB << verfile
|
7
|
-
|
8
|
-
file verfile => "README.md" do |*args|
|
9
|
-
File.binwrite args[0].name, <<-VERSION_FILE
|
10
|
-
module LZ4
|
11
|
-
VERSION = "#{ver}"
|
12
|
-
end
|
13
|
-
VERSION_FILE
|
14
|
-
end
|
15
|
-
|
16
5
|
|
17
6
|
unmatch = %r(\bcontrib/lz4/(?:Makefile|appveyor\.yml|contrib|doc|examples|lib/Makefile|lib/dll|programs|tests|visual)(?:$|/))
|
18
7
|
|
@@ -33,8 +22,8 @@ EOS
|
|
33
22
|
s.homepage = "https://github.com/dearblue/ruby-extlz4"
|
34
23
|
s.license = "BSD-2-Clause"
|
35
24
|
s.author = "dearblue"
|
36
|
-
s.email = "dearblue@users.
|
25
|
+
s.email = "dearblue@users.osdn.me"
|
37
26
|
|
38
|
-
s.add_development_dependency "rake", "~>
|
39
|
-
s.add_development_dependency "test-unit", "~> 3.
|
27
|
+
s.add_development_dependency "rake", "~> 0"
|
28
|
+
s.add_development_dependency "test-unit", "~> 3.3"
|
40
29
|
end
|
data/lib/extlz4.rb
CHANGED
data/lib/extlz4/oldstream.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: extlz4
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dearblue
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -16,44 +16,32 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 1.12.3
|
19
|
+
version: '0'
|
23
20
|
type: :development
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 1.12.3
|
26
|
+
version: '0'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: test-unit
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
36
30
|
requirements:
|
37
31
|
- - "~>"
|
38
32
|
- !ruby/object:Gem::Version
|
39
|
-
version: '3.
|
40
|
-
- - ">="
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: 3.2.7
|
33
|
+
version: '3.3'
|
43
34
|
type: :development
|
44
35
|
prerelease: false
|
45
36
|
version_requirements: !ruby/object:Gem::Requirement
|
46
37
|
requirements:
|
47
38
|
- - "~>"
|
48
39
|
- !ruby/object:Gem::Version
|
49
|
-
version: '3.
|
50
|
-
- - ">="
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: 3.2.7
|
40
|
+
version: '3.3'
|
53
41
|
description: 'unofficial ruby bindings for LZ4 <https://github.com/lz4/lz4>.
|
54
42
|
|
55
43
|
'
|
56
|
-
email: dearblue@users.
|
44
|
+
email: dearblue@users.osdn.me
|
57
45
|
executables:
|
58
46
|
- extlz4
|
59
47
|
extensions:
|
@@ -64,6 +52,7 @@ extra_rdoc_files:
|
|
64
52
|
- README.md
|
65
53
|
- contrib/lz4/LICENSE
|
66
54
|
- contrib/lz4/README.md
|
55
|
+
- contrib/lz4/build/README.md
|
67
56
|
- contrib/lz4/lib/LICENSE
|
68
57
|
- contrib/lz4/lib/README.md
|
69
58
|
- ext/blockapi.c
|
@@ -77,7 +66,6 @@ extra_rdoc_files:
|
|
77
66
|
- lib/extlz4/compat.rb
|
78
67
|
- lib/extlz4/fix-0.1bug.rb
|
79
68
|
- lib/extlz4/oldstream.rb
|
80
|
-
- lib/extlz4/version.rb
|
81
69
|
files:
|
82
70
|
- HISTORY.ja.md
|
83
71
|
- LICENSE
|
@@ -89,6 +77,30 @@ files:
|
|
89
77
|
- contrib/lz4/Makefile.inc
|
90
78
|
- contrib/lz4/NEWS
|
91
79
|
- contrib/lz4/README.md
|
80
|
+
- contrib/lz4/build/README.md
|
81
|
+
- contrib/lz4/build/VS2010/datagen/datagen.vcxproj
|
82
|
+
- contrib/lz4/build/VS2010/frametest/frametest.vcxproj
|
83
|
+
- contrib/lz4/build/VS2010/fullbench-dll/fullbench-dll.vcxproj
|
84
|
+
- contrib/lz4/build/VS2010/fullbench/fullbench.vcxproj
|
85
|
+
- contrib/lz4/build/VS2010/fuzzer/fuzzer.vcxproj
|
86
|
+
- contrib/lz4/build/VS2010/liblz4-dll/liblz4-dll.rc
|
87
|
+
- contrib/lz4/build/VS2010/liblz4-dll/liblz4-dll.vcxproj
|
88
|
+
- contrib/lz4/build/VS2010/liblz4/liblz4.vcxproj
|
89
|
+
- contrib/lz4/build/VS2010/lz4.sln
|
90
|
+
- contrib/lz4/build/VS2010/lz4/lz4.rc
|
91
|
+
- contrib/lz4/build/VS2010/lz4/lz4.vcxproj
|
92
|
+
- contrib/lz4/build/VS2017/datagen/datagen.vcxproj
|
93
|
+
- contrib/lz4/build/VS2017/frametest/frametest.vcxproj
|
94
|
+
- contrib/lz4/build/VS2017/fullbench-dll/fullbench-dll.vcxproj
|
95
|
+
- contrib/lz4/build/VS2017/fullbench/fullbench.vcxproj
|
96
|
+
- contrib/lz4/build/VS2017/fuzzer/fuzzer.vcxproj
|
97
|
+
- contrib/lz4/build/VS2017/liblz4-dll/liblz4-dll.rc
|
98
|
+
- contrib/lz4/build/VS2017/liblz4-dll/liblz4-dll.vcxproj
|
99
|
+
- contrib/lz4/build/VS2017/liblz4/liblz4.vcxproj
|
100
|
+
- contrib/lz4/build/VS2017/lz4.sln
|
101
|
+
- contrib/lz4/build/VS2017/lz4/lz4.rc
|
102
|
+
- contrib/lz4/build/VS2017/lz4/lz4.vcxproj
|
103
|
+
- contrib/lz4/build/cmake/CMakeLists.txt
|
92
104
|
- contrib/lz4/lib/LICENSE
|
93
105
|
- contrib/lz4/lib/README.md
|
94
106
|
- contrib/lz4/lib/liblz4-dll.rc.in
|
@@ -109,6 +121,8 @@ files:
|
|
109
121
|
- contrib/lz4/ossfuzz/decompress_frame_fuzzer.c
|
110
122
|
- contrib/lz4/ossfuzz/decompress_fuzzer.c
|
111
123
|
- contrib/lz4/ossfuzz/fuzz.h
|
124
|
+
- contrib/lz4/ossfuzz/fuzz_data_producer.c
|
125
|
+
- contrib/lz4/ossfuzz/fuzz_data_producer.h
|
112
126
|
- contrib/lz4/ossfuzz/fuzz_helpers.h
|
113
127
|
- contrib/lz4/ossfuzz/lz4_helpers.c
|
114
128
|
- contrib/lz4/ossfuzz/lz4_helpers.h
|
@@ -119,6 +133,8 @@ files:
|
|
119
133
|
- contrib/lz4/ossfuzz/round_trip_stream_fuzzer.c
|
120
134
|
- contrib/lz4/ossfuzz/standaloneengine.c
|
121
135
|
- contrib/lz4/ossfuzz/travisoss.sh
|
136
|
+
- contrib/lz4/tmp
|
137
|
+
- contrib/lz4/tmpsparse
|
122
138
|
- examples/frameapi.rb
|
123
139
|
- ext/blockapi.c
|
124
140
|
- ext/depend
|
@@ -134,7 +150,6 @@ files:
|
|
134
150
|
- lib/extlz4/compat.rb
|
135
151
|
- lib/extlz4/fix-0.1bug.rb
|
136
152
|
- lib/extlz4/oldstream.rb
|
137
|
-
- lib/extlz4/version.rb
|
138
153
|
- test/common.rb
|
139
154
|
- test/test_blockapi.rb
|
140
155
|
- test/test_frameapi.rb
|
@@ -142,7 +157,7 @@ homepage: https://github.com/dearblue/ruby-extlz4
|
|
142
157
|
licenses:
|
143
158
|
- BSD-2-Clause
|
144
159
|
metadata: {}
|
145
|
-
post_install_message:
|
160
|
+
post_install_message:
|
146
161
|
rdoc_options:
|
147
162
|
- "--charset"
|
148
163
|
- UTF-8
|
@@ -161,8 +176,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
176
|
- !ruby/object:Gem::Version
|
162
177
|
version: '0'
|
163
178
|
requirements: []
|
164
|
-
rubygems_version: 3.
|
165
|
-
signing_key:
|
179
|
+
rubygems_version: 3.2.14
|
180
|
+
signing_key:
|
166
181
|
specification_version: 4
|
167
182
|
summary: ruby bindings for LZ4
|
168
183
|
test_files: []
|
data/lib/extlz4/version.rb
DELETED