diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2019-11-29 14:11:48 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-04 12:30:58 +0000 |
commit | e8543db1c6e4a3ae6d6ed4481114090fdd43fa8f (patch) | |
tree | d78534e05a359d4d3b33157d90a30ac2c34794f7 /meta/recipes-devtools/flex/flex | |
parent | fb5037bbc50d298aa319bb6825de50b741413555 (diff) | |
download | poky-e8543db1c6e4a3ae6d6ed4481114090fdd43fa8f.tar.gz |
flex: update to 2.6.4
Add a backport patch that addresses segfaults on newer glibc versions.
Remove:
CVE-2016-6354.patch (backport)
0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch (issue fixed upstream)
do_not_create_pdf_doc.patch (issue fixed upstream)
ptest pass rate is 100%.
(From OE-Core rev: a0fe05f3ffd67dc42e053c20bd019bb9d463d0ad)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/flex/flex')
5 files changed, 33 insertions, 141 deletions
diff --git a/meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch b/meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch new file mode 100644 index 0000000000..60bf7ce8cf --- /dev/null +++ b/meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From ed1f7e9de0d6a1d5a9e581e02a63593d22cf1e52 Mon Sep 17 00:00:00 2001 | ||
2 | From: Explorer09 <explorer09@gmail.com> | ||
3 | Date: Mon, 4 Sep 2017 10:47:33 +0800 | ||
4 | Subject: [PATCH] build: AC_USE_SYSTEM_EXTENSIONS in configure.ac. | ||
5 | |||
6 | This would, e.g. define _GNU_SOURCE in config.h, enabling the | ||
7 | reallocarray() prototype in glibc 2.26+ on Linux systems with that | ||
8 | version of glibc. | ||
9 | |||
10 | Fixes #241. | ||
11 | |||
12 | Upstream-Status: Backport | ||
13 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
14 | --- | ||
15 | configure.ac | 2 ++ | ||
16 | 1 file changed, 2 insertions(+) | ||
17 | |||
18 | diff --git a/configure.ac b/configure.ac | ||
19 | index 55e774b..c879fe1 100644 | ||
20 | --- a/configure.ac | ||
21 | +++ b/configure.ac | ||
22 | @@ -25,8 +25,10 @@ | ||
23 | # autoconf requirements and initialization | ||
24 | |||
25 | AC_INIT([the fast lexical analyser generator],[2.6.4],[flex-help@lists.sourceforge.net],[flex]) | ||
26 | +AC_PREREQ([2.60]) | ||
27 | AC_CONFIG_SRCDIR([src/scan.l]) | ||
28 | AC_CONFIG_AUX_DIR([build-aux]) | ||
29 | +AC_USE_SYSTEM_EXTENSIONS | ||
30 | LT_INIT | ||
31 | AM_INIT_AUTOMAKE([1.11.3 -Wno-portability foreign check-news std-options dist-lzip parallel-tests subdir-objects]) | ||
32 | AC_CONFIG_HEADER([src/config.h]) | ||
diff --git a/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch b/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch deleted file mode 100644 index 438ca5f527..0000000000 --- a/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | From 7072befe1397af4eb01c3ff7edf99f0cd5076089 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> | ||
3 | Date: Tue, 30 Aug 2016 14:25:32 +0200 | ||
4 | Subject: [PATCH] avoid c++ comments in c-code - fails with gcc-6 | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | fixes: | ||
10 | |||
11 | | error: C++ style comments are not allowed in ISO C90 | ||
12 | | num_to_alloc = 1; // After all that talk, this was set to 1 anyways... | ||
13 | |||
14 | Upstream-Status: Pending | ||
15 | |||
16 | Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> | ||
17 | --- | ||
18 | src/flex.skl | 2 +- | ||
19 | src/scan.c | 2 +- | ||
20 | src/skel.c | 2 +- | ||
21 | 3 files changed, 3 insertions(+), 3 deletions(-) | ||
22 | |||
23 | diff --git a/src/flex.skl b/src/flex.skl | ||
24 | index 73a0b9e..ed71627 100644 | ||
25 | --- a/src/flex.skl | ||
26 | +++ b/src/flex.skl | ||
27 | @@ -2350,7 +2350,7 @@ void yyFlexLexer::yyensure_buffer_stack(void) | ||
28 | * scanner will even need a stack. We use 2 instead of 1 to avoid an | ||
29 | * immediate realloc on the next call. | ||
30 | */ | ||
31 | - num_to_alloc = 1; // After all that talk, this was set to 1 anyways... | ||
32 | + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ | ||
33 | YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc | ||
34 | (num_to_alloc * sizeof(struct yy_buffer_state*) | ||
35 | M4_YY_CALL_LAST_ARG); | ||
36 | diff --git a/src/scan.c b/src/scan.c | ||
37 | index b55df2d..f1dce75 100644 | ||
38 | --- a/src/scan.c | ||
39 | +++ b/src/scan.c | ||
40 | @@ -4672,7 +4672,7 @@ static void yyensure_buffer_stack (void) | ||
41 | * scanner will even need a stack. We use 2 instead of 1 to avoid an | ||
42 | * immediate realloc on the next call. | ||
43 | */ | ||
44 | - num_to_alloc = 1; // After all that talk, this was set to 1 anyways... | ||
45 | + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways...*/ | ||
46 | (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc | ||
47 | (num_to_alloc * sizeof(struct yy_buffer_state*) | ||
48 | ); | ||
49 | diff --git a/src/skel.c b/src/skel.c | ||
50 | index ef657d3..26cc889 100644 | ||
51 | --- a/src/skel.c | ||
52 | +++ b/src/skel.c | ||
53 | @@ -2561,7 +2561,7 @@ const char *skel[] = { | ||
54 | " * scanner will even need a stack. We use 2 instead of 1 to avoid an", | ||
55 | " * immediate realloc on the next call.", | ||
56 | " */", | ||
57 | - " num_to_alloc = 1; // After all that talk, this was set to 1 anyways...", | ||
58 | + " num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */", | ||
59 | " YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc", | ||
60 | " (num_to_alloc * sizeof(struct yy_buffer_state*)", | ||
61 | " M4_YY_CALL_LAST_ARG);", | ||
62 | -- | ||
63 | 2.5.5 | ||
64 | |||
diff --git a/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch b/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch deleted file mode 100644 index 216ac7ae1c..0000000000 --- a/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | From 3939eccdff598f47e5b37b05d58bf1b44d3796e7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
3 | Date: Fri, 7 Oct 2016 14:15:38 +0300 | ||
4 | Subject: [PATCH] Prevent buffer overflow in yy_get_next_buffer | ||
5 | |||
6 | This is upstream commit a5cbe929ac3255d371e698f62dc256afe7006466 | ||
7 | with some additional backporting to make binutils build again. | ||
8 | |||
9 | Upstream-Status: Backport | ||
10 | CVE: CVE-2016-6354 | ||
11 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
12 | --- | ||
13 | src/flex.skl | 2 +- | ||
14 | src/scan.c | 2 +- | ||
15 | src/skel.c | 2 +- | ||
16 | 3 files changed, 3 insertions(+), 3 deletions(-) | ||
17 | |||
18 | diff --git a/src/flex.skl b/src/flex.skl | ||
19 | index ed71627..814d562 100644 | ||
20 | --- a/src/flex.skl | ||
21 | +++ b/src/flex.skl | ||
22 | @@ -1718,7 +1718,7 @@ int yyFlexLexer::yy_get_next_buffer() | ||
23 | |||
24 | else | ||
25 | { | ||
26 | - yy_size_t num_to_read = | ||
27 | + int num_to_read = | ||
28 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; | ||
29 | |||
30 | while ( num_to_read <= 0 ) | ||
31 | diff --git a/src/scan.c b/src/scan.c | ||
32 | index f1dce75..1949872 100644 | ||
33 | --- a/src/scan.c | ||
34 | +++ b/src/scan.c | ||
35 | @@ -4181,7 +4181,7 @@ static int yy_get_next_buffer (void) | ||
36 | |||
37 | else | ||
38 | { | ||
39 | - yy_size_t num_to_read = | ||
40 | + int num_to_read = | ||
41 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; | ||
42 | |||
43 | while ( num_to_read <= 0 ) | ||
44 | diff --git a/src/skel.c b/src/skel.c | ||
45 | index 26cc889..0344d18 100644 | ||
46 | --- a/src/skel.c | ||
47 | +++ b/src/skel.c | ||
48 | @@ -1929,7 +1929,7 @@ const char *skel[] = { | ||
49 | "", | ||
50 | " else", | ||
51 | " {", | ||
52 | - " yy_size_t num_to_read =", | ||
53 | + " int num_to_read =", | ||
54 | " YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;", | ||
55 | "", | ||
56 | " while ( num_to_read <= 0 )", | ||
57 | -- | ||
58 | 2.1.4 | ||
59 | |||
diff --git a/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch b/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch deleted file mode 100644 index 29792efee8..0000000000 --- a/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | Upstream-Status: Inappropriate (embedded specific) | ||
2 | |||
3 | Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> | ||
4 | |||
5 | Index: flex-2.6.0/doc/Makefile.am | ||
6 | =================================================================== | ||
7 | --- flex-2.6.0.orig/doc/Makefile.am | ||
8 | +++ flex-2.6.0/doc/Makefile.am | ||
9 | @@ -2,7 +2,7 @@ help2man = @HELP2MAN@ | ||
10 | |||
11 | info_TEXINFOS = flex.texi | ||
12 | dist_man_MANS = flex.1 | ||
13 | -dist_doc_DATA= flex.pdf | ||
14 | +EXTRA_DIST= flex.pdf | ||
15 | |||
16 | CLEANFILES = \ | ||
17 | flex.aux \ | ||
diff --git a/meta/recipes-devtools/flex/flex/run-ptest b/meta/recipes-devtools/flex/flex/run-ptest index 19db337900..037301c40f 100755 --- a/meta/recipes-devtools/flex/flex/run-ptest +++ b/meta/recipes-devtools/flex/flex/run-ptest | |||
@@ -2,4 +2,4 @@ | |||
2 | 2 | ||
3 | # make would want to rebuild some files with a compiler otherwise :-/ | 3 | # make would want to rebuild some files with a compiler otherwise :-/ |
4 | make FLEX=/usr/bin/flex -t check-TESTS || true | 4 | make FLEX=/usr/bin/flex -t check-TESTS || true |
5 | make FLEX=/usr/bin/flex check-TESTS | 5 | make FLEX=/usr/bin/flex abs_builddir=./ check-TESTS |