diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-05-12 11:30:51 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-05-14 14:13:50 +0100 |
commit | 44c3881b18f74eb64379818fc150f94398fb8a49 (patch) | |
tree | d900c2e5d2e866fdc4cf36f1821bbda19ab4c54a /meta/recipes-devtools/gcc/gcc-10.1/0031-fix-segmentation-fault-in-precompiled-header-generat.patch | |
parent | cf4c4c65df5349b60895525418954281b3140173 (diff) | |
download | openembedded-core-contrib-44c3881b18f74eb64379818fc150f94398fb8a49.tar.gz |
gcc10: Update to GCC 10.1 Release
* Package new gomp header acc_prof.h
* Package lto-dump which is a new tool in gcc10
* All Changes are here [1]
* Porting apps to gcc 10 help is here [2]
* Backport a patch to fix CET errors on cross builds
* Add patch to fix mingw libstdc++
[1] https://gcc.gnu.org/gcc-10/changes.html
[2] https://gcc.gnu.org/gcc-10/porting_to.html
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-10.1/0031-fix-segmentation-fault-in-precompiled-header-generat.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-10.1/0031-fix-segmentation-fault-in-precompiled-header-generat.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-10.1/0031-fix-segmentation-fault-in-precompiled-header-generat.patch b/meta/recipes-devtools/gcc/gcc-10.1/0031-fix-segmentation-fault-in-precompiled-header-generat.patch new file mode 100644 index 0000000000..702279af0e --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-10.1/0031-fix-segmentation-fault-in-precompiled-header-generat.patch @@ -0,0 +1,57 @@ +From 27b8ba5555ada2dab076988529bfb84d00a4b901 Mon Sep 17 00:00:00 2001 +From: Juro Bystricky <juro.bystricky@intel.com> +Date: Mon, 19 Mar 2018 22:31:20 -0700 +Subject: [PATCH] fix segmentation fault in precompiled header generation + +Prevent a segmentation fault which occurs when using incorrect +structure trying to access name of some named operators, such as +CPP_NOT, CPP_AND etc. "token->val.node.spelling" cannot be used in +those cases, as is may not be initialized at all. + +[YOCTO #11738] + +Upstream-Status: Pending + +Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + libcpp/lex.c | 26 +++++++++++++++++++++----- + 1 file changed, 21 insertions(+), 5 deletions(-) + +diff --git a/libcpp/lex.c b/libcpp/lex.c +index 56ac3a1dd73..73a951148b3 100644 +--- a/libcpp/lex.c ++++ b/libcpp/lex.c +@@ -3311,11 +3311,27 @@ cpp_spell_token (cpp_reader *pfile, const cpp_token *token, + spell_ident: + case SPELL_IDENT: + if (forstring) +- { +- memcpy (buffer, NODE_NAME (token->val.node.spelling), +- NODE_LEN (token->val.node.spelling)); +- buffer += NODE_LEN (token->val.node.spelling); +- } ++ { ++ if (token->type == CPP_NAME) ++ { ++ memcpy (buffer, NODE_NAME (token->val.node.spelling), ++ NODE_LEN (token->val.node.spelling)); ++ buffer += NODE_LEN (token->val.node.spelling); ++ break; ++ } ++ /* NAMED_OP, cannot use node.spelling */ ++ if (token->flags & NAMED_OP) ++ { ++ const char *str = cpp_named_operator2name (token->type); ++ if (str) ++ { ++ size_t len = strlen(str); ++ memcpy(buffer, str, len); ++ buffer += len; ++ } ++ break; ++ } ++ } + else + buffer = _cpp_spell_ident_ucns (buffer, token->val.node.node); + break; |