]> code.ossystems Code Review - openembedded-core.git/commit
gcc7: fix potential segmentation fault
authorJuro Bystricky <juro.bystricky@intel.com>
Fri, 4 Aug 2017 22:40:54 +0000 (15:40 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 10 Aug 2017 23:08:32 +0000 (00:08 +0100)
commit6f81fe4f3a1177c0049b26a070e43546bc6fe974
tree29adb0fb7d6bc4734f88837f2649462a34de80c0
parent35e3ed68fd25941e3d76e5a063299b1d1cee0e70
gcc7: fix potential segmentation fault

Under some rare circumstances we may end up with GCC segmentation fault.
This was observed with versions of sysmacros.h, which contain macros
with embedded warning messages :

When trying to actually display the warning, we may end up with a segmentation
fault instead. The reason is the actual warning message gets parsed (the text is
unquoted) and words in the message such as "not", "and" etc. are interpreted as
operators CPP_NOT, CPP_AND. When the time comes to display the warning, the code
uses wrong structure to access the "name" corresponding to the operators.

[YOCTO #11738]

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-devtools/gcc/gcc-7.1.inc
meta/recipes-devtools/gcc/gcc-7.1/fix-segmentation-fault-precompiled-hdr.patch [new file with mode: 0644]