See
https://gcc.gnu.org/ml/gcc/2016-10/msg00165.html
for the background. This causes pthread_cond_wait in glibc to write out
of bounds on i386.
Fix was suggested by Jim Wilson.
Tested on x86_64-redhat-linux-gnu, with no new regressions. Also tested
against the i386 glibc reproducer, and verified that _Unwind_GetIPInfo
is called from the __gcc_personality_v0.
Okay for trunk?
We probably should backport this to all active branches as well. The
risk is fairly low because the C unwinder personality is rarely used
(Eric Botcazou pointed out that the C++ and Ada personalities are not
affected by this).
2016-10-21 Florian Weimer <fwei...@redhat.com>
PR libgcc/78064
* unwind-c.c: Include auto-target.h.
Index: libgcc/unwind-c.c
===================================================================
--- libgcc/unwind-c.c (revision 241395)
+++ libgcc/unwind-c.c (working copy)
@@ -26,6 +26,7 @@
#include "tconfig.h"
#include "tsystem.h"
+#include "auto-target.h"
#include "unwind.h"
#define NO_SIZE_OF_ENCODED_VALUE
#include "unwind-pe.h"